Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Aaron Ware

    (@aware)

    Hi Agnes,

    Typically it SHOULD loop based on the page hierarchy and page order. Let me dig into it and see if something is deterring it finding the next sections. I should be able to look into this a little bit later today for you. Sorry for not getting back to you sooner for some reason I never get notifications when someone submits a support request.

    Thread Starter Agnes

    (@agneslesagegmailcom)

    Thanks Aaron! Just tell me if you need something more my side to find out.

    Plugin Author Aaron Ware

    (@aware)

    No problem, Are you using the shortcode or the functions? Additionally are you passing any attributes in either scenario?

    Thread Starter Agnes

    (@agneslesagegmailcom)

    I am using the functions.

    I put this in a single-post.php:

    <!-- PAGINATION -->
    <div class="other_posts">
    <?php previous_post_link( '<span class="prevp">%link</span>'); ?>
    <?php next_post_link( '<span class="nextp">%link</span>');	  ?>
    </div>

    And that in page.php:

    <!-- PAGINATION -->
    <?php
    if ($display_posts != "1") {// except if after blog list
    echo '<div class="other_posts">';
    echo '<span class="prevp">'; 	echo previous_page_link(); 	echo'</span>';
    echo '<span class="nextp">'; 	echo next_page_link(); 	echo'</span>';
    echo '</div>';
    } ?>

    In other instances (homepage & section pages where a list of posts has been proposed), the pagination looks alike but is using different functions to send to the blog.

    Plugin Author Aaron Ware

    (@aware)

    Okey doke. In order for it to loop we need to tell it to do that in an argument. I’ve made some changes below. Try it out and let me know.

    <!-- PAGINATION -->
    <?php
    if ($display_posts != "1") {// except if after blog list
    echo '<div class="other_posts">';
    echo '<span class="prevp">'; 	echo previous_page_link( array( 'loop' => true ) ); 	echo'</span>';
    echo '<span class="nextp">'; 	echo next_page_link( array( 'loop' => true ) ); 	echo'</span>';
    echo '</div>';
    } ?>

    On a separate but related topic. Your code could be optimized a little bit. You don’t necessarily need all of those echos for your html content

    <!-- PAGINATION -->
    <?php if ($display_posts != "1") : // except if after blog list ?>
    <div class="other_posts">
        <span class="prevp"><?php echo previous_page_link( array('loop' => true) ); ?></span>
        <span class="nextp"><?php echo next_page_link( array('loop' => true) ); ?></span>
    </div>
    <?php endif; ?>
    Thread Starter Agnes

    (@agneslesagegmailcom)

    In one word: IT WORKS ??

    And thanks for the php correction: I am not a developer, just happy when it works and learning from bits of code I manipulate. This way obviously makes things easier. One more thing I’ve learned today!

    Re the loop in array, had I missedf sthg in the documentation or it is just because you know better!?

    Agnes

    Thread Starter Agnes

    (@agneslesagegmailcom)

    PS: thanks a lot for the support and nice plugin, I’ll definitely use it again.
    Would be great you get your WP notificatiosn work, itt can save one’s life ??

    Plugin Author Aaron Ware

    (@aware)

    No problem, I will be sure to update the documentation to be a bit clearer. I guess it’s cause I “know better” haha but that’s only because I wrote it. I think the readme.txt defines it but I can add it to the FAQ for future reference. Thanks for the feed back and glad I could help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Linchpin – PrevNextPage] Looping really?’ is closed to new replies.