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 ↓

  • Tiagirl

    YES!!! Finally it works!!! But Ive got to really look around for that htacessfile… And now I got a lots of ideas of links!!! THANKS!!!

    I was really thinking I was an idiot who couldnt make it work… 🙁

  • Breno Nunes

    Chris,

    I´m sweating blood on that for almost 2 days by now. I´m a newbie but I think I have done all the procedures you requested in this topic, and it still doesn´t work. Does the fact that I´m using 2.5 WP has anything to do with that? Anyway, here´s what I´ve done:

    1- First Step: I´ve chosen Custom, I rewrote /%postname%/ in the associated text field, then I generated the TextPad archive with the code that WP provided me and then I uploaded it to Cutline2pt1 in my FTP. It not only didn´t work out but also now my categories and post pages aren´t opening. Really don´t know where I´ve went wrong…

    2 – SecondStep: I just can´t find the ID of the pages on the Manage (Pages) Panel of WP 2.5… ??? : /

    Can you give me a light here? Thanks so much!

  • Yuzien Born

    You rock for this. very comprehensive. Solved an 8-hour long problem of mine. Hugz ; )

  • Leimrod

    Ok i’m using WP 2.5.0 and “step 1” no longer works. There is no “Options” link in the CP anymore. There also seems to be nowhere to change the permalink type. If i’m wrong on this can someone point me to where I need to change the permalink type in WP 2.5.0

  • Leimrod

    never mind, my bad. In WP 2.5 you can now change the permalink type by navigating to “settings>Permalinks”

  • Pretty Links i.e. Permalinks - DIY Themes Forums

    […] Pretty Links i.e. Permalinks Don’t forget to update your Permalink structure in WordPress to: /%postname%/ If I’m talking gibberish or you want to know more, visit: How to Get More Search Engine Traffic With One Simple Tweak | Tubetorial Why Don’t My “Archives” and “About” Links Work? | Cutline Theme for Wo… […]

  • Susan

    I’m losing my mind. I’ve read everything. Am I the only one in the world that doesn’t have the “post slug” field? I love post 74, but it didn’t work – I don’t have the post slug. Also, I can’t find the page id info to do what Anne said in post 148. I’m using 1.3 and wp 2.5.1

  • nancy

    I don’t have the post slug either. I paid someone to fix them and they worked for awhile, but then they stopped for no reason I can fathom. I’ve about given up — maybe I don’t really need archives.

  • bliss

    i swear i have followed EVERY instruction on every page, but i’m still getting 404 errors.

    i think for some reason my .htaccess file must be in the wrong place, bc i have no idea what else it could be. i also tried to use chmod to set it as writable, but apparently it didn’t work.

    i’m frustrated, and i really want to have pretty permalinks. help!

  • bliss

    wow. it was something so simple, and yet so tricky…

    when i uploaded the .htaccess file my ftp program (or something) was changing the name of it to .htaccess.txt which threw off the whole thing.

    everything is great now. love the template.

  • citizenship + cutline theme

    […] for WordPress and have problems with your links (especially, about, archive, and sitemap ones) go here to check for the solution or ask […]

  • ned

    Hi Chris,

    I tried you suggestions for fixing my “About” link and I still can’t get it to work properly.

    The header php currently shows this code (which is a little different from the original code in your example):

    <a href=”/about/”>about

    Nothing happened when I changed the above code to:

    about

    I know that my about page exist (http://stopbeasting.com/blog/?page_id=2), but I cannot figure out how to successfully program the code so that it properly links from the front page. Please advise.

    Thanks,
    ned

  • Jill

    What about WordPress on Windows? (please, don’t tell me not to, that’s just the way it’s gotta be).

    I changed my permalinks to the custom setting, and now, not only do I get 404 pages for my Archive and About pages, now I am getting them for the post pages.

    I DO have the pretty permalinks, but they go nowhere.

  • Tracy

    Chris,

    I installed the Cutline theme a couple of days ago. I’ve not been able to try with the .htaccess file because I see no code, that is aooearant to me, to put in this file. Where is this code located?

    I also changed the name of the folder that the WORDPRESS

  • Tracy

    Chris,

    I installed the Cutline theme a couple of days ago. I cannot get the Archives link to work. I’ve not been able to try with the .htaccess file because I see no code, that is appearant to me, to put in this file. Where is this code located?

    I also changed the name of the folder that the WORDPRESS files reside in on my server. Could this be affecting the Archives link in some way?

  • Kelly

    Really need an update on these instructions for WordPress 2.5 > please.

    At this point, I still don’t have working about or archives pages after trying just about everything listed above. Straightforward instructions for enabling these in the latest version would really help…

  • Enabling the “About” and Archives” Pages on Cutline | Cutline Theme for WordPress

    […] be simple as explained in one of our earlier instruction posts, and it has even been expounded upon right here, just in case your permalink structure is a bit different from what how we would usually do […]

  • Adrian

    My issues was “Sitemap” vs “sitemap” in the URL. Change it to upper case “S” and you’ll find your page!

  • Regina

    I know html, but am very limited otherwise. I still can’t add pages to my cutline theme, but really like it otherwise! Any suggestions? My header.php file has this code, not the one you show above:

    HEADER PAGE: ORIGINAL CODE:

    <a href=””>front page
    <a href=”/archives/”>archives
    <a href=”/about/”>about
    <a href=””>RSS

    I tried inserting the line item entries, and adding the page ID, but nothing showed up.

    Thanks!

  • kaylee

    Hi i have a site for the buisness my family runs and um i put a comment box on theyre and when i put in a comment it said that page does not excist HELP!

  • Shrit

    guys help plz… when im logging in to my account. and then chosse my charecter. then im getting half the way loading in to wow. and then theres a pub up thing ” WOW FAIL”

  • Recent Theme Updates

    […] page needs to be seriously updated to fit into this new theme. On his site, Racoma explains how to edit the header so you can customize the pages which are displayed right under your […]

  • Spunky844

    You are the best of all the Word Pressers! thanks a many to you and you army of num-chuck gun wielding Gerbils!

  • Why Don’t Header Links Work and How Can I Edit Post Slug? | Cutline Theme for WordPress

    […] navigation links don’t work, and how to enable or change post and page slugs. This has been discussed here before, but for the benefit of users who may not have had the chance to review the previous discussion, we […]

  • Tuo Pe

    Thanks for writing this article. It helped me solve my problem with WordPress.

    Tuo

  • Tetman

    Thank you. I’m quite new to WordPress and your tip worked.

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