Thursday, May 25th, 2006...5:11 pm
Why Don’t My “Archives” and “About” Links Work?
You’ve followed the setup instructions perfectly. You’ve done a bang-up job creating your “archives” and “about” pages, but your “archives” and “about” links in the navigational bar still don’t work. What’s wrong? How do you fix this?
The Problem
The header code was constructed under the assumption that your permalink structure is date and name based. Unfortunately, the WP default permalink structure is not date and name based. Thus, whenever someone who is using the default permalink structure attempts to use the PressRow navigational bar, they will encounter this problem (i.e. their links won’t work).
At this point, you may be asking yourself, “Why did he create the theme to work with a permalink structure that differs from the default structure?” Luckily, I have a good answer this time! The WordPress default permalink structure carries absolutely no semantic meaning in terms of the URL construct. It’s got question marks, equal signs, and numbers, and it’s just plain ugly. The date and name based structure, on the other hand, carries quite a bit of pertinent information with it, including chronology and a shorthand version of the post name itself. Most WordPress “purists” opt for this type of permalink structure because there is a growing movement on the web to use URLs that actually mean something to humans (rather than just to servers).
Fortunately, there are two possible solutions to this problem, and you can implement whichever one suits your needs best.
The Solutions
Solution #1: Change your permalink structure
Log in to your WP Administration panel and click on the “Options” link. Next, click on “Permalinks” in the sub-navigation menu. Choose the second option (”Date and name based”) and then click on the “Update Permalink Structure” button. If you’re lucky, WordPress will automatically update your directory structure, and no further editing will be necessary. If you’re not so lucky, you’ll have to do a minor .htaccess modification in order to complete the permalink structure transition.
In the event that you have to do an .htaccess mod, WordPress will actually supply you with the necessary code to make everything happen. Simply copy that code, and then start a new document in the text editor of your choice (but not the standard Notepad that comes with Windows!). Paste the code in the new document, and save the file as simply “.htaccess” (the preceeding period is crucial). Once you’re done, upload that file to your core WordPress directory folder.
Obviously, if you already have an .htaccess file, then you’ll have to concatenate the existing file with this new snippet of code that WordPress has provided.
I realize that this explanation is somewhat cryptic, and if you’d like some more information, you ought to check this out.
Solution #2: Change your header file to work with your directory structure
If you don’t want to change your permalink structure as indicated above, then you can always modify the header to accommodate your newly-created “archives” and “about” pages. Whenever you create a page, it is assigned a unique identity number. In order to make your navigational links work correctly, all you have to do is modify the destinations of the “archives” and “about” links in the “Header” template file.
Before modification, your “Header” contains this code:
<li><a class="archives" href="http://analyticaasia.com/archives/">archives</a></li>
<li><a class="about" href="http://analyticaasia.com/about/">about</a></li>
After modification, it should look something like this (changes indicated in red):
<li><a class="archives" href="http://analyticaasia.com/?p=6“>archives</a></li>
<li><a class=”about” href=”http://analyticaasia.com/?p=7“>about</a></li>
If you still have problems, please let me know in the comments!
33 Comments
May 28th, 2006 at 4:03 pm
Is it possible to add more menu items to the top horizontal menu?
June 27th, 2006 at 8:50 pm
I love your theme. Very clean and bright.
The setup instructions that you mention here (and that are on the about page) are, in my humble opinion, not easy enough to find. A readme file and/or a link to these instructions in your description of the theme which appears in the wordpress backend would have made things run a lot more smoothly for me.
June 30th, 2006 at 1:33 pm
I choose to update the permalink structure and wordpress successfully did it, however the archives header menu link goes to a 404 page. Any thoughts?
July 3rd, 2006 at 6:23 pm
Ed, did WordPress suggest that you update your .htaccess file after you changed your permalink structure? In some cases, changing your directory structure will cause internal links to screw up if you don’t update your .htaccess file.
WordPress 2.0+ usually updates your .htaccess file automatically, but if it cannot complete this step, it will give you a warning message accompanied by a block of code that must be inserted into your .htaccess file.
If you can supply me with a link to your site, I may be able to diagnose this more precisely.
July 3rd, 2006 at 6:26 pm
Marc,
Yes, you can add items to the top menu, but you’ll have to edit the header.php file yourself in order to add the items. The good news is that you can follow the formatting that’s already there in order to get the results you want. It should be reasonably simple.
In the future, I will (hopefully) release a version of the theme with a customizable options page like that found on the k2 theme.
July 3rd, 2006 at 6:27 pm
Charlie,
Duly noted. I will be adding a tell-all .txt file to the next update of the theme.
July 8th, 2006 at 3:40 pm
(Lots of comments, I know, sorry :$)
Ooo… from what I understand the structure makes it very difficult to add a tab on top in the header, since right now, you need to create a new page template (mainly to accomplish the tab highlighting with “class=XXX”), create a new header, have the new page fit the new page template to load the new header, then go to each of the other pages’ headers and add the new page to their list.
That’s way too complicated.
Is there no other way to add a few tabs in there? How could I make it dynamic before adding the K2 improvements?
July 9th, 2006 at 8:11 pm
I’ve got the same problem as Ed. Right permalink structure, but I’m still getting a 4o4 on the Archives page. I *believe* I had the permalink structure right from the start too. The URL is the website I’m using for this comment.
BTW, this is a BEAUTIFUL theme. Well done!
July 24th, 2006 at 7:35 pm
I love your theme, well done! I’ve changed my themes from one to the other and at the end settled at yours.
One question — I have added an extra menu item (’Reviews’), and have changed the header.php. However, when I go to the Reviews page, the header shows as if I was visiting my ‘About’ page, if that makes sense? I have created header_reviews.php, but what other setting should I tinker with to make the Reviews page work ok?
Thank you in advance and again, well done!
July 26th, 2006 at 10:47 pm
Arry,
Thanks for the kind words on the theme!
Regarding your problem, the answer is not as simple as it ought to be because the theme does not currently come equipped with a working “Theme Options” page. Be that as it may, a solution does exist, although it will require you to create a new “Page” template, a new header file, and some CSS.
It sounds bad, but actually your job will mostly consist of copying and pasting content, so no worries there. Anyhoo, on with the show!
Adding a Menu Item
To illustrate, let’s assume that you want to create a new tab called Reviews as you’ve mentioned above.
1. Create a new page template to accomodate the new menu item
page.phptemplate file, and paste that code into a new file calledreviews.phpreviews.phpfile, add this code to the top of the file (before the first line of code):<?php/*
Template Name: Reviews
*/
?>
<?php include('header_reviews.php’); ?>2. Create the header file that you’ve just called from the new template
header_about.phpinto a new file, and name that fileheader_reviews.php.<div id="page" class="about">Change it to read:
<div id="page" class="reviews“><li>to the unordered list of navigation links. The finished list item will probably look something like this:<li><a class="review" href="<?php bloginfo('url'); ?>/reviews/">reviews</a></li>header_(name).phptemplate files.3. Adding the necessary CSS
.blog #nav li a.blog, .blog #nav li a.blog:visited, ....reviews #nav li a.review, .reviews #nav li a:visited.review4. Creating your new “Reviews” page
Your new navigational link should be fully functional!
July 27th, 2006 at 7:23 am
I’m getting the same 404 error as Ed did after changing the permalink structure. I made the change immediately after a new install so maybe there weren’t any archives. Kind of new to Wordpress so I’m not sure how often it archives the entries. The only entry I have right now is the default entry. My site is www.thisforthat.org
Thanks in advance for any help.
Charles
August 20th, 2006 at 9:47 pm
I think if anyone is still having problems with their “About” links, it’s probably because they pulled a Homer and didn’t read the directions on the following page, although this very post says to: http://www.findcreditcards.org/pressrow/about/
If we could have one central location for all these directions tho, that would be great.
Thanks.
August 22nd, 2006 at 6:47 am
Thanks for the tip, Nuno! Saved me a big D’oh.
And thanks for the most beautiful theme, Chris, it really is lovely.
August 24th, 2006 at 7:49 am
On point 2.4 of the list for adding a menu item, I had to change the header file as well as the header_name files.
Just trying to save someone else that Homer moment…
August 28th, 2006 at 6:09 am
[…] Fortunately, the author is aware of the problem and has http://www.findcreditcards.org/pressrow/2006/05/25/why-dont-my-archives-and-about-links-work/ […]
August 28th, 2006 at 9:19 am
I love your theme…very clean and easy to read. I recently launched a blog at:
http://www.debbieohi.com/inspiration/
to log the faltering but hopefully steady progress as I learn CSS. I am having trouble getting the “ARCHIVES” link to work. I tried changing the permalink structure, but I still get a 404.
So now I’m attempting to implement your second suggestion, but am having trouble finding the correct lines to modify, or at least I’m not sure where to put the “?p=6″ and “?p=7″ alterations. Here are the lines I’ve found in my Header.php:
/archives/”>archives
/about/”>about
Suggestions most welcome!
– Debbie
August 28th, 2006 at 10:10 am
Hm…the lines of code didn’t come across properly, sorry. Let’s try again, sorry:
/archives/”>archives
/about/”>about
August 28th, 2006 at 10:12 am
Augh, sorry. I’ve posted the lines of code in a separate text file so they won’t be interpreted:
http://www.electricpenguin.com/temp/code.txt
Thanks!
August 28th, 2006 at 10:35 am
Debbie,
The problem is that although you’ve attempted to change your permalink structure, nothing has actually changed because you have not modified your
.htaccessfile.For someone who is not all that familiar with servers, changing an
.htaccessfile can be a daunting task. Fortunately, you can still get your links to work without modifying any files on the server side of things. Here’s how it works.6and7as shown in the example (highlighted in red).This is guaranteed to work if you do it correctly
August 28th, 2006 at 10:46 am
THANK YOU SO MUCH for all your help. Everything works fine now.
It turns out I had assumed that I had already read the Setup instructions with the initial download…I hadn’t realized they weren’t included (or if they were, I missed them). I feel so stupid (e.g. Homer moment)!
I would VERY much like to make some kind of small donation in support of your upgrade efforts and because of the wonderful job you’ve done with PressRow. I’ve noticed some other Theme authors do this. Do you have a Paypal donation account?
And again…thank you!
August 28th, 2006 at 11:08 am
Debbie,
I’m glad this worked for you! I’ve got a super-stealthy beta version of a theme that is based on PressRow, and I’ve solved most of these headaches in that new theme. The best part is that I’ll be able to move that knowledge over here to improve the PressRow experience as well.
Regarding the donations, I haven’t yet set anything up, but I do have a PayPal account that would suffice until I can get a secure button set up on this site.
You can reach me on PayPal at
sales@designerknockoffs.net. Thanks very much for your support of the theme and your enthusiasm!August 28th, 2006 at 11:23 am
I’ve sent my donation.
I’ve also discovered your great blog, and have mentioned your article about magazines/blogs in Inkygirl (one of my sites that I want to redesign with CSS eventually).
Thanks again!
August 28th, 2006 at 11:31 am
Debbie,
Thanks very much! Any Web guru will tell you that nothing beats a free link…
Except for a link and a donation!
Thanks again!
September 26th, 2006 at 8:59 pm
Hi … me again!
I’ve edited my comments.php file to include some text explaining my default gravatar, etc as follows:
<h2 class=”form_head”>Leave a Reply</h2>
< >
<p><small>All you need to do to free yourself of the burqa forever is register your own <a href=”www.gravatar.com”>gravatar</a>; if only it were that easy for everyone. </p>
<p>For your convenience and my amusement, annoying commenters will bear Teh Mark of Teh Troll™ gravatar. </small></p>
My problem is that when you hit the linked text from the comment window, the link to the post you’re at is attached to the front of the www.gravatar.com and gives you a 404. Any suggestions on how I can set up a clean link?
February 18th, 2007 at 7:08 pm
I am also having trouble getting the archive page to work. I tried changing the permalink structure but got an image of wood and a 404 error message easy tiger your in the wrong place. Also tried solution to but got the plain 404 error
I would be happy either with an archive page for the archives and category list or the ability to but them in the side bar as it is with my current theme. I really would like to use press row, it is much nicer then what I have going but I do want the archives available some where. It is a great theme.
February 19th, 2007 at 9:02 am
Ok, I now have the archive and about pages up. I pieced it all together from the various comments. The site is just about what I want. I do have some trouble navigating with the page tabs at the top.
1. when I click on about or archives it first goes to the blog page and then on the second click on the about or archives page tab it them goes to those pages. Any ideas
2. How can I reduce the size of the tabs, and text in the page tabs. I would like them just a bit smaller.
Thanks again!
March 18th, 2007 at 10:48 am
Your theme is really nice and clean. I love the comments in the code that tell me what is what. I only know basic CSS and it helps me so much.
I’ve been able to work with your code to move around elements to customize it. The only thing I can’t figure out is how to move the nav right underneath the header image (I have it underneath, but there’s a large gap) Also, how can I center the nav?
Thanks a lot!
April 22nd, 2007 at 10:54 pm
Thanks for creating this theme–it’s quite pretty.
I also had some trouble getting the “Archive” link to work. When I tried to follow the instructions for creating an archive link, the instructions didn’t match the menus I saw in WordPress (v. 2.1.3)
In step 5, the instructions say to “…open up the “Post Slug” box, and then enter “archives” in the field….” However, the there is no “Post Slug” box, only a “Page Slug” box. However, I select Archives from the Page Template menu, and type “archives” into the Page Slug box.
In step 6, the instructions say “…Click the “Create New Page” button to finish up…” However, there is no “Create New Page” button. The buttons include “Save and Continue Editing” | “Save” | “Publish”. Clicking them does not save the page — when you go to the “Manage” > “Pages” admin page, there are no new pages listed.
I suspected that WordPress wasn’t saving the page because it had no content, so I tried adding a single character (a period) to the Page content before I tried saving. That was apparently enough to get WordPress to save the page, and after I did so, the archives appeared.
July 17th, 2007 at 11:30 am
Awesome Christopher!
Thanks for figuring this one out, I was having the same problem.
Great theme, but the instructions are sorely in need of an update.
July 27th, 2007 at 3:02 pm
Hi there,
To anyone reading this, I am using the PressRow theme and comment system won’t seem to be working..if I switch to another theme it works fine..ANYTHING i don’t know about, checked WP options and it seems to be fine :S. Any help what so ever will be much appreciated, I’m getting 405 message when trying to comment!
my mail is:
dave[dot]venter @ gmail [dot] come
Cheers Dave
August 5th, 2007 at 6:53 am
I would actually just like to get rid of the tabs in the header. The about tabs and just use my page links within the blog. Is that possible. It would save so much and I know almost nothing about this so I would need easy details. I want to use your theme once I can do that (get rid of the tabs).
Thanks!
Bryan
August 8th, 2007 at 3:32 pm
As far as I can tell I’ve tried everything suggested here and still I can’t get the archives to work.
I have created an archive page using the archive template and slugged it “archives” (with no quote marks), but like Christopher noted above I entered a ‘period’ in the text box but my archives did not show up.
The archives page is showing up on my home page, the archive link takes me to the correct page but no archives have shown up.
I have had my archives in my sidebar and yesterday noticed that the archives have not been aggregating since I migrated my blog to my own domain. I’ve been able to get everything else working correctly, even after editing the them a bit.
There is no script showing on the archives page.
I will appreciate any suggestions.
August 9th, 2007 at 12:37 pm
Ok, I got things straightened out and the archives is working.
I replaced the Press Row archive.php and archives.php with those from the WordPress default theme and everything magically appeared.
All is well. Thanks for producing such a nice them and making available.
Leave a Reply
You must be logged in to post a comment.