Cutline Theme for WordPress

One Giant Leap for Mankind

Cutline Theme for WordPress header image 2

Why Don’t My “Archives” and “About” Links Work?

September 7th, 2006 · 176 Comments · How To

You’ve followed the setup instructions perfectly. You’ve done a bang-up job creating your Archives and About pages, but your 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 ends with the post name (for more info, read this section of the WordPress Codex). Unfortunately, the WordPress default permalink structure is not constructed this way. Thus, whenever someone who is using the default permalink structure attempts to use the links in the navigation menu, they will encounter this problem (i.e. their links won’t work).

The WordPress default permalink structure carries absolutely no semantic meaning in terms of the URL construct.

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 “pretty permalink” 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 best suits your needs and abilities.

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.
  • Do one of the following:
    • Choose the second option (Date and name based)
    • Or choose the fourth option (Custom), and then write /%postname%/ in the associated text field
  • 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! I recommend TextPad). 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. If this paragraph sounds like Greek to you, then you probably don’t need to worry about this step :)

I realize that this explanation is somewhat cryptic, and if you’d like some more information, you ought to check out what the WordPress Codex has to say on this topic.

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 the links in your navigation menu work correctly, all you have to do is modify the destinations of the Archives and About links in the header.php template file.

Before modification, your header.php file contains this code:

<li><a class="archives" href="http://path_to_your_blog/archives/">archives</a></li>
<li><a class="about" href="http://path_to_your_blog/about/">about</a></li>

After modification, it should look something like this (changes indicated in red):

<li><a class="archives" href="http://path_to_your_blog/?page_id=3">archives</a></li>
<li><a class="about" href="http://path_to_your_blog/?page_id=2">about</a></li>

The numbers above (3 and 2) are used as examples only. The unique IDs of your Archives and About pages may be different, so you need to verify them on your own WordPress installation. Here’s how you do that:

  • In your WordPress Administration panel, click on the Manage link in the navigation menu.
  • Next, click on the Pages link in the sub-navigation menu.
  • The leftmost column is labeled ID – enter the appropriate value for each page into your header.php file, and your links will work!

If you still have problems, please let me know in the comments…Thanks!

Tags:


176 Comments so far ↓

  • Ryan McKillen

    Chris, thanks for your Jan 30, 2007 comments in response to Debbie’s post. I was pulling my hair out, but my archive page is now working.

  • Debbie Ridpath Ohi

    Hi Chris. I’ve been testing my page with different browsers and discovered something odd. Click on my Archives Link from the main page (or anywhere, I suppose) looks fine in Firefox but gives a 404 error in Safari.

    Does this make any sense? Am I going mad?

  • Chris

    Debbie,

    Welp, I guess you’re just going mad :)

    Link behavior is never browser-dependent. Instead, you probably need to make sure you clear the cache on both browsers and then test the link again.

  • Debbie Ridpath Ohi

    Ok, I truly AM going mad. I cleared my cache in both Safari and Firefox. Firefox still tells me the page is there, Safari still gives me a 404.

    I asked friends and family to check the page, and both browsers give a 404.

    I’m going to assume that there IS a problem with the Archive page, even though I can’t see it in Firefox. I’m not sure why, since I did the fix you described earlier and it looked fine after that in Firefox. Here’s a screen shot of my Pages area:

    http://www.electricpenguin.com/temp/pics/inkygirl.jpg

    Here’s my maddening Archives page:

    http://www.inkygirl.com/archives/

    Any advice appreciated!

    Hallucinating Debbie

  • Debbie Ridpath Ohi

    Just noticed something else odd…

    When I look at the pseudo-working http://www.inkygirl.com/archives/ page in my Firefox browser, the image that the page is using is header_3.jpg

    In Safari, http://www.inkygirl.com/archives/ seems to be using header_5.jpg

    The most recent change I made was to upload new header images, but I just checked that /images/ directory and nothing looks unusual.

    This is driving me nuts! I know I must have done something wrong, but I’m not sure what.

  • Chris

    Debbie,

    Try blasting the current archives page and creating a new one. If that doesn’t work, re-upload the original archives.php page from the theme download and then try again.

  • Debbie Ridpath Ohi

    Thanks, Chris. Nuking the current archives page and creating a new one worked.

    Glad I’m not going mad after all. :-)

  • Chris

    Now if I could only figure out why that worked, we’d be in business.

  • Kevin

    Hi Chris. This is probably the best theme I’ve ever used in terms of looks and ease of customization. I’m having the same problems that plagued Debbie and Jeff. My archive, about and RSS feeds all give 404 errors. I tried the two recommended fixes but it’s still not working. Any ideas on where to look next?

    Thanks again a great theme.

  • Owen

    Chris – I can’t get my archives page to work. I did the alteration for the permalinks and the about page works. I check and update the “Enable the Cutline Archives page” option. But, it does not show up on my “Manage/Page” page – only my about page does.

    I reloaded the archives files. Any suggestions.

  • Andrew

    Hi Chris,
    I’ve got the archives working… but only when I’m logged in… weird, I know. Any ideas? Thanks for a great theme.

  • Andrew

    Ok, I get the stupid award… I didn’t click “Publish”

  • Fanny

    First of all thanks for the theme. It looks great. I am just getting started and have a lot to learn. I found your explination and was able to fiw the “About” and “Archives” issue. However, when i creat a new page. It does not appear. I tried to change the default theme and it did appear. Probably also has to do with the permalinks. Any suggestions?

  • fhs

    First of all thanks for the theme. It looks great. I am just getting started and have a lot to learn. I found your explination and was able to fiw the “About” and “Archives” issue. However, when i creat a new page. It does not appear. I tried to change the default theme and it did appear. Probably also has to do with the permalinks. Any suggestions?

  • Tony

    fhs,

    I have the same problem and it seems(someone correct me if i’m wrong) that the navigation links have been hardcoded to only include the front page, about and archives. Most themes, probably like the theme you switched to after finding the problem, dynamically generate the links from the pages found in wordpress. Thus, the only way to get the same results is to employ the same method to create the navigation links.

    Truthfully, though, someone may have already implemented the solution and hopefully will post that here for you. Fortunately, the sitemap for cutline does generate links for all pages created within wordpress . So, i’m assuming, one could lift that code and, once placed inside the correct tags, you could achieve the results you are looking for.

    Alternatively, you could just directly link to the pages you wish to display in the nav menu and not cause yourself too much work. I’m not sure how to post code in a comment or I would, but if you still need help, visit my site, flip to the contact page and send me an email.

  • Bob

    Hello Chris.

    I installed Cutline1.1 about 2 weeks ago.

    When I selected the Cutline Archives page under “Presentation Cutline Options” nothing would happen. I do not get an Archives page.

    I get a 404 error page when I click on Archives.

    I attempted your solutioln no.1 to my permalink structure

    This resulted in my Archives page showing a linked title of my most recent post.

    The page also has a line saying “do not edit this page”. Plus a leave a comment box. It also has login logout links (which I don’t think should be there).

    And lastly, is shows a title bar of “responses so far”

    My page doesn’t look anything like the Archives page at cutline.tubetorial.com

    My header.php doesn’t look anything like you show in your solution no. 2 so I’m reluctant to attempt to change it.

    I’m stumpted. What can you suggest?

    Regards
    Bob
    PS I’ve left the page as is after doing solution no. 1 just in case you have a look.

  • Owen

    Chris,

    I don’t seem to have what it takes to get my achieves and sitemap pages to work. As a neophyte, I have exceeded my skill level.
    Here is what I have discovered -
    • Achieves works when I am signed in to WordPress
    • This is a line of code on the Achieves page that I noticed is different than your page: rolfblog.com — supporting rolfing clients
    What I have done –
    • Repeated trying the previous suggestions of other comments
    • Reloaded many of the original Cutline files
    • Tried features on other themes and they work

    Sitemap at bottom does not work, even when logged on to WordPress
    In addition, how do I get other pages on header?

    Thanks for any help you can give me.

  • Des Walsh

    After trying a number of other themes, I came back to yours and could see that for functionality and look it suited my purpose very well. Then, as have others, I struck the ‘no Archives page’/404 problem. I’ve tried several times to activate the Cutline Archives feature and the control panel registers that it’s installed, but when, like others here, I go to the Manage Pages page, there is the About page in splendid isolation, no Archives page. I’ve uninstalled the whole theme, re-installed, zapped the archives.php and re-created it, looked in vain for the code you indicate is in the header file. Would love to use this theme, so I’m hopeful a solution will emerge. FYI, while I was testing, I tried another theme and found archives worked perfectly, sidebar archives component appeared, and worked etc.

  • Chris

    Des — Your Archives page is not working because you are relying solely on the “Cutline Options” page, and this feature of the theme is known not to work properly.

    While you could follow the instructions in this post and solve your problem, you essentially just need to do the following:

    1. Visit the ManagePages area of your WordPress Dashboard
    2. Locate the Archives page and hit Edit.
    3. Hit Publish.
  • Des Walsh

    Chris

    Thanks. I did go through the tutorial and endeavoured to follow the instructions. With hindsight, I should have mentioned in my previous comment that, like others above, when I go to Manage -> Pages there is only an About page listed, no Archives page. Did it several times, before and after re-installing. Same result. So I don’t get to the Publish option.

  • Bob

    Hello Chris.

    Thanks for getting back on this.

    I’ve tried everything suggested in the posts.

    I do not have an archives page.

    When I tried “Manage Pages” the archive page is not there.

    If there’s something wrong with cutline as you admit…wouldn’t it make sense to fix it?

    I know the template is free but its been almost 3 weeks since I tried to setup my blog and it can’t be done properly.

    I’m going to go and buy a template that works properly.

    I’ve never used so-called free ware before because I’ve been told they usually are put together by people who think they know software but in reality all they produce is headaches for the people who use the stuff.

    I see far too many posts on this problem and there doesn’t seem to be any desire to fix it.

    Lets face it. If the template was worth anything, it wouldn’t be free.

  • Chris

    Bob — You couldn’t be more wrong about paid vs. free templates, and although you’ve basically insulted me to my face, I’m going to help you out anyway.

    All you have to do is Write a new page, name the damn thing “Archives,” plug “archives” into the post slug, choose the “Archives” Page Template, and hit publish.

    Don’t worry about using the “Cutline Options” panel to get the Archives page working.

    And finally, a vast majority of the “problems” with this issue arise because commenters don’t care to read through the post OR the other comments first. Instead, they just fire away with their problems.

    The reality of the situation is that this site contains the answers to all of these questions; people just don’t know what to do if they actually have to look for something.

  • Des Walsh

    Chris
    I can appreciate why you feel annoyed and you are of course perfectly entitled to express your frustration any way you like. But as one of the people having some difficulty, I did read through the post and the comments and tried to apply the principles and workarounds. I acknowledge that my lack of technical expertise may well have meant that I missed something which would be obvious to you and others. But I don’t see it as a productive use of your time or mine to bother you further with this. And I don’t do confrontation well. I’ve seen and tried enough blogging “solutions” now to know that there is usually something that defies my capability to solve completely, so I recognise I need to find something that works for me and not to stress about that. Sorry to have troubled you. It is indeed a very attractive theme and a lot more functional and responsive than some I’ve tried.

  • Chris

    Des, others — If you’ve already tried to create the Archives page from the “Cutline Options” panel, do this:

    1. Delete the existing Archives page.
    2. Create a new page by going to Write → Page.
      • Enter “Archives” in the title field.
      • Enter nothing in the text body
      • Enter “archives” (without quotes) in the Post Slug field (on the right).
      • Select “Archives” from the drop-down list in the Page Template field (also on the right)
    3. Hit Publish.

    Now, if you don’t see your new Archives page, then it’s quite likely that you have a permalinks issue, which is something that I’ve covered extensively both in the text above and also in a video at Tubetorial.

    There is absolutely no reason to give up on this task, as I would rate it a 2-3 difficulty on a 10 scale of “Necessary things to learn about WordPress.”

  • Des Walsh

    From a grateful slow learner, thanks Chris. It worked. :)

  • Bryan

    Hi Chris,

    i’m testing the cutline theme and get the pages to work. I don’t know where to put the code for id’s in to make it work properly.

    This is my header content:
    href=”">front page
    href=”/archives/”>archives
    href=”/about/”>about
    “>RSS
    .

  • Bryan

    If you didn’t understand my previous post I agree. I don’t understand it also.
    The problem is that I don’t know how to make the page ‘archives’ or ‘about’ to work. I know i need to put in the id’s into the header. My header code differs from your post here so i’m a little lost.

    Here my header:

    href=”">front page
    href=”/archives/”>archives
    href=”/about/”>about
    “>RSS

    Bryan

  • Chris

    Bryan — You’ve already changed your permalink structure, and I just verified that your About page link is working properly.

    To get your Archives page working, simply follow the steps from this comment.

  • Sidney McLean

    Could someone tell me why I get the site index page or 404 error instead of my archieves, about, contact page?

    Index of /

    * WordPress/
    * sitemap.xml
    * sitemap.xml.gz

  • Sidney McLean

    I finally fixed the links….now when I click on the links in the side bar and the post titles, I am sent to the index page.

    What am I overlooking now!! I thought wp would automatically create a page for each post to go in the archives. I’m just rambling, I really don’t have the foggiest idea what is suppose to happen.

    Well back to tinkering….

  • Ecohuman.com

    Chris,

    your post #74 worked for me. i had all the issues others had, and to be honest, instructions on your site were difficult to understand and didn’t work as described. but–in #74, you got it right. go for that style in other FAQs and lots of people will be happy.

    thanks again for the template.

  • Owen

    Chris,

    Thanks for the response you gave Des on the Achieves page. After trying every I could find on your site and could think of myself, I was lost. I am also new to this and figured that it had to be simple. Your new suggestion did it.

    I appreciate your patience with us beginners.

    Thanks,

    Owen

  • Franck Silvestre

    Chris, my archive page is working now, but I have this problem with the category:

    by Category:

    Fatal error: Call to undefined function: wp_list_categories() in /home/makemone/public_html/mynetmarketingland/blog/wp-content/themes/Cutline2/archives.php on line 21

    What should I do on this line 21?

    Click on my archive page to see the problem.

    Thank you.

  • Franck Silvestre

    Good, everything is working fine now.

    My blog wasn’t upgraded to 2.1

    Thank you.

  • Guy

    http://cutline.tubetorial.com/why-dont-my-archives-and-about-links-work/#comment-7156 got the Archives working thanks for taking to the time to make an easy to understand post.

  • Meg

    When I check the box to have Cutline create the Archives, it did not add the page to my pages. There’s no “Archives” page for me to manage. The Archives link, in Cutline, returns a 404 error message.

    Thoughts?

    I switched back to Tropical 1.0 for now. But I look forward to tweeking the Cutline theme and getting it running soon.

    Meg
    http://www.centerofmuse.com

  • Meg

    Nevermind, I got it working. Amazing what READING the comments can do!

    Thanks,

    Meg

  • Installing Cutline Theme | Patrickone Dotnet

    [...] Now, first thing to do is of course to make sure that WP is installed properly. In order to install Cutline and get everything to work properly, it is also necessary to change WP’s default settings for the Permalinks to use the more Pretty Links that are Date and Name based. If you keep the WP default for Permalinks you may notice that the Archive and About pages linked from the navigation menu will not work without making changes directly in the header.php file. For full explanation and troubleshooting check out this post on the Cutline site. [...]

  • Masked Marvel

    I like this theme a lot. Thanks.

    One problem that I have found is that the create_archive function in functions.php creates a record of type ‘post’ rather than of type ‘page’. Once I updated the record using phpMyAdmin I was able to get this functionality to work.

  • Marco

    I had a problem with this mod to the permalink structure.
    I used method #1, chose Date and About and Archives worked fine.
    HOWEVER, I got a strange and fatal error: I couldn’t edit any post or page because I got an error when accessing the “Write” page.

    After a lot of searching on WordPress.org forums I found this post

    http://wordpress.org/support/topic/115149?replies=9

    After scrolling past the half I found a post by otto42 who says:

    Do you actually have directories named /2005/06/ and so on? That would cause this sort of thing.

    I reverted to default permalink and the error went away. Reverted back to either Date or the Custom permalink format and the error came again preventing me from editing anything (it’s a problem with a blog).

    I wanted to use solution #2 but the code you show is very different from mine.

    Here is what I have in the header.php in my Cutline theme (I edited the theme a little bit to get rid of the title):

    href=”">front page
    href=”/archives/”>archives
    href=”/about/”>about
    “>RSS

    So I am stuck now. If I use the default permalink both Archives and About don’t work. If I change the permalink with solution #1 I cannot use the blog. Solution #2 seems different from what I have.

    Any clue? I really love the theme and I have been able to personalize to suit my needs very easily.

    Please, help!

  • Marco

    Mmm… the snipped from my header.php code doesn’t look like what I pasted. It seems that it has been interpreted by this forum code.

    Well, I hope it’s still clear for you Cutline/Wordpress experts.

  • Gregg

    Great words – as someone ‘noted’ above, I created my archives page, everything was fixed – must have deleted it a couple years ago as a WP noob and since then relied on other themes for menu and old article access. This is a GREAT theme – very readable, and the name says it all – CUTs to the bottom LINE. One thing I have noticed in we2.0 sites is back to simplicty in color, but with much more function…

  • Archives and permalinks

    [...] found out why here. The header code was constructed under the assumption that your permalink structure ends with the [...]

  • About worked instantly, but I had to fiddle a bit to get Archives to work

    [...] the headline said, when I changed the permalink structure as instructed, the “About” page worked instantly.  However, I kept getting a 404 message for the [...]

  • Alvin

    I’m new to WP and Cutline. Here’s my experience with “Archives” http://colaussi.com/2007/05/29/about-worked-instantly-but-i-had-to-fiddle-a-bit-to-get-archives-to-work/

    As soon as I get a little more comfortable with things, I’ll move my tmbrandingcap site over.

    Thanks for the great theme

  • Kaboing

    I have a problem with the archives page. I tried enabling it from the options, and it said that the archives had been created. However, the page couldn’t be found in admin and published. In phpMyAdmin, I noted that the archives were created as a post/static and not as a page/publish. I tried changing it to page/published (as the About-page, which works just fine), but it didn’t help. Browsing to it with http://blog.lincoln.se/?page_id=15 works, but not http://blog.lincoln.se/archives . Do you have an idea why? I’m using wp 2.2

  • Anthony

    Post 74 worked for me but I still had to create an Archives page manually first as it wasn’t created by the archives option.

    I didn’t realise the archives page had its own template but once I saw Post 74 which mentioned it and selected the template in the Page template field it worked perfectly.

    Thanks for great template, Chris.

  • Chris (no, not THE Chris)

    Thanks for a great template and great support. I was having issues with the Archives page and found the solution to my problem in the comments here.

    From one Chris to another:
    Thanks, thanks, and thanks!

  • Bonita

    I enabled to archive page in cutline options, but when i go to manage posts, i do not see any pages with archives in header. Do i manually create 1 page?

    Also, I am having problems with simpleviewer gallery in this theme. When I view my site from homepage or search engine, the gallery for all posts will display, but when i try to view my posts via archives search, or categories search or calender search will not display and error message like below is displayed instead.

    “SimpleViewer requires Macromedia Flash. Get Macromedia Flash.

    This is a WPSimpleViewerGallery

    var fo = new SWFObject(”http://www.chanlegacy.com/wp-content/plugins/wp-simpleviewer/viewer.swf”, “viewer”, “500″, “640″, “7″, “#000000″);
    fo.addVariable(”preloaderColor”, “0xffffff”);
    fo.addVariable(”xmlDataPath”, “http://www.chanlegacy.com/wp-content/photos/20070709a/gallery.xml”);”

    Can you please help?

  • Rick McLaughlin

    Post 74. Let me say it again: Post 74. The greatest post in the history of the archives question…
    Thanks, thanks again, and thank you for post 74.
    Rick McLaughlin

Leave a Comment (Need help? Visit our Support page and Forums first.)