Forums

Please help! Every Post link links to the most recent post. (23 posts)

  1. killsurfcity
    Member
    Posted 2 years ago #

    This is my first wordpress site. The theme is based on minimalism, but has been modified a good deal. I am a novice, so I only really changed things I could understand from my minimal php and html knowledge.

    I got the site up on time, with one blog post up. Later I added another one and tested it. Big problem! Any link that used to take you to the old post (ie: Post link, and side-bar "Recent Posts" links) now takes you to the newest one. I tested it by adding a third post, and got the same result.

    the site is: http://www.lgtrippgallery.com

    thanks for you help!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-specific problems?

    - resetting the plugins folder by FTP or phpMyAdmin? Sometimes, an apparently inactive plugin can still cause problems.

  3. killsurfcity
    Member
    Posted 2 years ago #

    esmi,
    yeah, i tried deactivating plugins, with no luck.
    [edit] just tried resetting my plugins. no luck after that either.

    one thing i just noticed is that the url for the post is always correct, but for some reason only the most recent post displays.

    i'll give the other stuff a shot, but i suspect it's not something so simple. as i said, i'm a noob at all this... and i hacked the hell out of the code behind minimalism to make it do what i want. i imagine somewhere is all of that, i screwed something up somehow. that's my theory anyhow.

    thanks for your help!

  4. johnhmcc
    Member
    Posted 2 years ago #

    Hey Guys,

    I am having the exact same problem and have not hacked anything with regards to my theme at all - This just started happening but I can't figure out what may have triggered it.

    If anyone else has come across this, please advise!

    here is a link to the site: http://www.mostlythecoast.com

    You will see that the URL changes when you click on anything in the top nav bar and is actually correct BUT the latest post is always displayed. I even made that most recent post private and it STILL gets displayed. I have re-updated to the latest version of WP but that didnt change anything.

    Any help is appreciated

  5. killsurfcity
    Member
    Posted 2 years ago #

    Thanks John. I'm glad to see someone else is having the same issue (even tho it sucks). Makes me think it might not be something I did. Maybe it's the most recent wordpress update. Hopefully someone here can give us a hand.

  6. johnhmcc
    Member
    Posted 2 years ago #

    I hope so - It's almost like anything I do int eh admin panel doesnt change. I even trashed the post that keeps getting displayed everytime you click a link. This was the most recent post but after I trash it, it is STILL being displayed. I hope someone can shed some light on this issue.

  7. johnhmcc
    Member
    Posted 2 years ago #

    I should also say that when I preview a post from my wp-admin, it previews as if I am not signed in - so theres like 100 page views from "WordPress Dashboard" which is me obviously... so weird

  8. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Have either of you tried switching to the default theme?

  9. johnhmcc
    Member
    Posted 2 years ago #

    I have tried that - after I activated the default theme, I went to the website and it looked exactly the same - the same post is there that I have already deleted and the same theme (non default)... I even rolled back my DB 3 days so the post that is showing up isnt even in my admin panel anymore.

    I really dont know whats goin on here - are there any other people besides the two of us who have been having this problem?

  10. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Try turning WP Super Cache off.

  11. killsurfcity
    Member
    Posted 2 years ago #

    Esmi, no I haven't. I'm wasn't sure that wouldn't mess my layout up. I'm using the core templete structure of minimal with customized css. I was worried that when I switched back I'd lose something. Is this an issue or am I just being too cautious?

  12. johnhmcc
    Member
    Posted 2 years ago #

    I turned it off and still the same results - my database is good and has no errors but my wordpress site still posts the same post for every link you choose eventhough this is NOT in the DB and has been deleted permanently... any other advice would be wonderful - I gotta get this site working again :)

  13. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    @killsurfcity: providing your donlt delete your current theme, temporarily switching to the default them should not, in theory, cause you to lose any theme customisations.

  14. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    @johnhmcc: WP-Super-Cache is still running. From the source of your home page:

    <!-- Dynamic page generated in 47.301 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2010-04-09 10:24:20 -->
    <!-- super cache -->

    You'll need to deactivate it and empty the cache.

  15. johnhmcc
    Member
    Posted 2 years ago #

    esmi: thanks for staying with this thread :) - In my admin panel, WP Supercache is off - it seems nothing that changes in my admin panel propagates to my actual site. I will look into how to kill supercache manually here... hopefully that gets me somewhere

  16. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    If old pages are being served to your visitors via the supercache, you may be missing Apache modules (or their equivalents if you don't use Apache). 3 modules are required: mod_mime, mod_headers and mod_expires. The last two are especially important for making sure browsers load new versions of existing pages on your site.

    http://wordpress.org/extend/plugins/wp-super-cache/faq/

  17. killsurfcity
    Member
    Posted 2 years ago #

    so i switched the theme, and the problem went away. so what do i do now?

  18. killsurfcity
    Member
    Posted 2 years ago #

    i tried replacing the archive.php file from my modified theme with the original file from "minimalism", and it did not fix the problem. what other files should i check?

  19. killsurfcity
    Member
    Posted 2 years ago #

    bump!

    i keep trying things to fix this, but no luck so far. Can someone please help?

    thanks

  20. killsurfcity
    Member
    Posted 2 years ago #

    ok, so i think i found my issue. i have a custom sidebar, sidebarright.php
    when i disable that, post links begin working as normal again.

    so the question is, what did i do wrong here:

    <div id="sidebarright">
    		<?php global $post; $categories = get_the_category(); foreach ($categories as $category) : ?>
    		<h3>Previous posts:</h3>
    		<ul>
    		<?php $posts = get_posts('numberposts=20&category='. $category->term_id); foreach($posts as $post) : ?>
    		<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    		<?php endforeach; ?>
    
    		<li>View the full archive for<a href="<?php echo get_category_link($category->term_id);?>" title="View all posts filed under <?php echo $category->name; ?>"> <?php echo $category->name; ?> &raquo;</a></li>
    		<?php endforeach; ?>
    	</ul>
    	</div>
  21. Safirul Alredha (zeo)
    Member
    Posted 2 years ago #

    Add rewind_posts()

  22. killsurfcity
    Member
    Posted 2 years ago #

    thanks for the tip. where would i add it?

  23. Safirul Alredha (zeo)
    Member
    Posted 2 years ago #

    hmmm before </ul>

Topic Closed

This topic has been closed to new replies.

About this Topic