WordPress.org

Ready to get started?Download WordPress

Forums

WP 2.7 - all permalinks displaying same post (10 posts)

  1. TrishaM
    Member
    Posted 5 years ago #

    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?

  2. TrishaM
    Member
    Posted 5 years ago #

    Bump.....I still need help with this.....here 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.

    http://stage.1-800-scuba-dive.com/

    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

  3. TrishaM
    Member
    Posted 5 years ago #

    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

  4. mpayne002
    Member
    Posted 5 years ago #

    Hi there,

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

    Thanks, Mike

  5. peterassmann
    Member
    Posted 5 years ago #

    Hi there,

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

  6. mpayne002
    Member
    Posted 5 years ago #

    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...

    Mike

  7. mpayne002
    Member
    Posted 5 years ago #

    Live HTTP Headers helped

  8. Rhand
    Member
    Posted 4 years ago #

    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..

  9. Rhand
    Member
    Posted 4 years ago #

    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.

  10. Odaku128
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.