The WP Mystery Code!
-
I’ve even tried a paid WP answers site and nobody can figure this out! Maybe checking out that link will give us a few hints as to the solution, somebody has to know how to do this: https://wpquestions.com/question/show/id/1352
Right now I’m telling the code to pull up two posts per archive page in my portfolio category. But when I click the older entries button it doesn’t find the other posts in that category, it sends me to my 404 error page. I need to get the other posts to show when I click older entries.
Link: https://lucaswynne.com/category/portfolio/
Extra note: I want to still be able to use WP’s settings to show a maximum number of posts and don’t want those settings to affect my portfolio page.
<?php get_header(); ?> <div id="portfolio_content"> <!-- Grab posts --> <?php if (query_posts('posts_per_page=2')) : ?> <?php while (have_posts()) : the_post(); ?> <div style="width:980px; background:#000"> <div class="img"> <a href="<?php the_permalink() ?>"> <?php $image = catch_that_image(); if( $image ) { ?> <img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>, <?php comments_number('No comments','One comment','% comments'); ?>" /> <?php } ?> </a> <div class="title"><?php the_title(); ?></div> <div class="desc">Add a description of the image here</div> </div> </div> <?php endwhile; ?> <?php endif; ?> <!-- Next/Previous Posts --> <div class="mp_archive"> <div id="more_posts"> <div class="oe"><?php next_posts_link('? Older Entries') ?></div><div class="re"><?php previous_posts_link ('Recent Entries ?') ?></div> </div> </div> </div> </div> <?php get_footer(); ?>
- The topic ‘The WP Mystery Code!’ is closed to new replies.