Support » Fixing WordPress » WP 2.7 – all permalinks displaying same post

  • Setting up a new site with WP 2.7 intended to replace an older (non-WP) site and having a strange problem……

    I have a couple of posts and pages set up, with links to them, but whenever I click on any of the permalinks, WP will only display the same (first) post I entered, even though the permalink is correct and the page title displays correctly…….

    I’m using the Sandbox theme to work from, and have verified that the php being used on page.php and single.php is correct….so I can’t figure out why it will only show post #4…..

    Has anyone else experienced this? Or have a suggested fix for it?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Bump…..I still need help with this… is a link to the new site I’m working on……you can see I’ve got 5 pages and 3 posts set up – hovering over them shows the correct permalinks, but clicking on any them just continually shows post ID# 4. I’m using a custom permalink structure of /%postname%/ as we don’t want dates or categories showing in the URL.

    This link will only be active until I get the site finished and live, which won’t be until I figure out this problem. If I can’t get it figured out within a day or two, I’ll be forced to downgrade to WP 2.6.3

    I could really use some help with this….I think I have it narrowed down to the culprit, but don’t know exactly how to fix this – in trying to set up the new site to look identical to the old site, I had a listing on the left sidebar with this code:

    <?php query_posts('showposts=15&orderby=title&order=ASC&cat=3'); ?>
       <?php while (have_posts()) : the_post(); ?>
         <li><a href="<?php the_permalink(); ?>"> > <?php the_title(); ?></a></li>
       <?php endwhile; ?>

    This creates the “menu” which is a list of links to the posts in the category (3) that I want, however, I think this is what is messing with what is displayed on the single.php and page.php pages.

    I tried changing this to use get_posts instead of query_posts, which includes all posts even though I’m limiting it to a single category (a problem all by itself), but it does allow the actual page or post content to be displayed correctly, but changes the menu on the left when you go to a single post or page – the menu then becomes the link to just that page that you’re on.

    So what I need is a way to list the post links (titles) in the left sidebar, restricted to a single category, and still have the_post() work correctly when you click on one of those links to go to a post or page….

    I hope this makes sense



    Hi there,

    I was wondering if you managed to solve the problem, as I’m also having it!

    Thanks, Mike



    Hi there,

    I wonder why you replaced the wordpress site instead of updating it.



    After some experimenting it appeared that the single.php page was being cached somewhere along the line, so adding:

    header(“Cache-Control: no-cache, must-revalidate”);

    to the top of header.php, seems, to have solved the problem, perhaps not the most elegant solution…




    Live HTTP Headers helped

    I am having more or less the same issue. I moved a site to another location, updated the permalinks. Now All page links link to whatever post or page I am on. Really strange. I will check out http headers. I just wonder how it can help..

    After I saved all the created posts and pages without any changes in the WordPress dashboard all permalinks to them were working again. maybe a caching issue as was mentioned before.

    I had a similar problem.

    Check your custom permalink structure to see if any extra spaces have found there way in.

    I had an extra space at the end of /topics/%postname%

    It caused all the permalinks to default to my latest post.

    Removed it – Problem solved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WP 2.7 – all permalinks displaying same post’ is closed to new replies.