• 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: https://www.lgtrippgallery.com

    thanks for you help!

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter killsurfcity

    (@killsurfcity)

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

    Thread Starter killsurfcity

    (@killsurfcity)

    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?

    Thread Starter killsurfcity

    (@killsurfcity)

    bump!

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

    thanks

    Thread Starter killsurfcity

    (@killsurfcity)

    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>

    Add rewind_posts()

    Thread Starter killsurfcity

    (@killsurfcity)

    thanks for the tip. where would i add it?

    hmmm before </ul>

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Please help! Every Post link links to the most recent post.’ is closed to new replies.