• Resolved kristinachilds

    (@kristinachilds)


    Thank you so much for this plugin. I had been searching for a way to page through the posts alphabetically for a while now.

    My ultimate goal is to have a “? BACK | NEXT ?” nav on all single page posts within a certain category. I tried using the return => ‘href’ parameter to return just the url, but that returned nothing at all. in fact, none of the return parameters i tried worked. Can you tell me how to get the “back” and “next” text displayed on screen rather than the post title? Here is what I am currently running with:

    <a href="<?php previous_post_link_plus( array( 'order_by' => 'post_title','in_same_cat' => true ,'return' => 'href' ) ); ?>" style="color: #000;">&laquo; BACK</a> |
    <a href="<?php next_post_link_plus( array( 'order_by' => 'post_title','in_same_cat' => true ,'return' => 'href' ) ); ?>">NEXT &raquo;</a>

    https://www.ads-software.com/extend/plugins/ambrosite-nextprevious-post-link-plus/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ambrosite

    (@ambrosite)

    The ‘href’ parameter returns the link as a PHP string, so you would need add an echo in front of the function calls in order to print it to the screen.

    However if all you are trying to do is title your links ‘BACK’ and ‘NEXT’, you don’t need the href parameter at all. Use the ‘link’ parameter to format your link, like this:

    <?php previous_post_link_plus( array( 'order_by' => 'post_title', 'in_same_cat' => true, 'link' => 'BACK' ) ); ?>  |
    <?php next_post_link_plus( array( 'order_by' => 'post_title', 'in_same_cat' => true, 'link' => 'NEXT' ) ); ?>

    Thread Starter kristinachilds

    (@kristinachilds)

    I just knew there had to be a way to change out the content of the link text! Thanks so much… It wasn’t entirely clear in the documentation… at least for someone who is fairly new to php ??

    Plugin Author ambrosite

    (@ambrosite)

    I’m glad to hear it’s working for you. ?? I am marking this thread resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Ambrosite Next/Previous Post Link Plus] return only permalink url’ is closed to new replies.