Help needed with correct paging
-
Hey guys!
I’ve been editing my own theme for quite a while now, and thing are starting to get in place.
However, I have a problem with correct paging.
I want my website to show the very last (and single) blog post on the startpage. And by clicking the arrows on the right side, you browse back and forth through previous blog posts – still only showing one post at a time.
And it does works. But by browsing back and forth through the previous blog posts, the URL only shows “/page/2/” (and so on) – and not the permalink to the blog post. (Which I have activated).
As you probably understand, this can be an issue when someone wants to for example bookmark a specific blog post. Because when I add furthermore posts, the content of the bookmarked URL, lets say, “/page/10/” will change to a completely different blog post.
So what am I doing wrong here?
My loop looks like this:
<?php get_header(); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php if (in_category('121')) continue; ?> <?php include('fullscreen.php'); ?> <?php endwhile; ?> <?php else : ?> <h2>Ble ikke funnet</h2> <p>Beklager, men du ser etter noe som ikke er her.</p> <?php endif; ?> </div> <?php get_footer(); ?>
The content of fullscreen.php:
<div class="post clear" id="post-<?php the_ID(); ?>"> <!--Loading display while images load--> <div id="loading"> </div> <!--Slides--> <div id="supersize"> <?php the_content(); ?> </div> <!--Content area that hovers on top--> <div id="content"> <div id="contentframe"> <div id="date"> <h1><?php the_time('d/m') ?></h1> <h2><?php the_time('Y') ?></h2> </div> <div id="text"> <h1><?php the_title(); ?></h1> <h2><?php echo get_post_meta($post->ID, 'description', true); ?></h2> </div> <!--Navigation--> <div id="navigate"> <div class="previous"><?php next_posts_link('« Next page') ?></div> <div class="next"><?php previous_posts_link('Previous page »') ?></div> </div> </div> </div>
Please help me out guys. I’m sure it’s just a small fixture.
Example can be seen here:
https://www.sebastianramsland.com
- The topic ‘Help needed with correct paging’ is closed to new replies.