• Hey folks,

    In my template the previous 5 posts are shown (from the active post on) just with a title, date and category.

    What I would like is that people can always navigate through these posts by pressing ‘previous posts’ and ‘next posts’, even when a post with comments is active (this is the hard part…)

    What would be even better… is when this all happens without refreshing the entire page.

    Is there anyone who knows a plugin for this OR… can help with the code so I can post it in my template?

    thanks in advance!
    – Marcel

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter xanuex

    (@xanuex)

    –gentle kick–

    Well, I dont know, but you’ve perked my interest. I spent a few minutes googling it and came across this:

    https://anthologyoi.com/awp

    I don’t know if this will help you at all, I haven’t looked into it deeply yet. I just scanned the features, maybe it’ll give you somewhere to start?

    Thread Starter xanuex

    (@xanuex)

    At least I could interest someone else with my post ??

    I already have the plugin installed, although the plugin has many features (and maybe even the one I am looking for) it stays an overall plugin. I think I’m more looking for a specific solution for my problem.

    this is the code I am using right now

    <h2>Previous Entries</h2>
    
    <ul class="block">
    
    <?php
      $myposts = get_posts('numberposts=5&offset='.$paged);
    
      foreach ($myposts as $post) :
        setup_postdata($post);
        unset($categories);
    
        foreach (get_the_category() as $category)
          $categories[] = $category->cat_name;
    ?>
    
      <li><a href="<?php the_permalink();?>"><span><?php the_title(); ?></span><em><?php the_date();?> in <?=implode(", ",$categories);?></em></a></li>
    
    <?php endforeach;?>
    
    </ul>
    
    <span class="prev_entry"><?php next_posts_link('&laquo; Previous Entries') ?></span>
    <span class="next_entry"><?php previous_posts_link('Next Entries &raquo;') ?></span>

    I think I need to change the type of function used for showing ‘next/previous’-post to one of my own which just effects the above code but I actually don’t really know how ??

    So if there is someone who can give me some strong hints I would be very glad!

    Found a solution to this yet? Im looking for exactly the same thing :S

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[ajax] previous/next posts always’ is closed to new replies.