Support » Plugin: Ambrosite Next/Previous Page Link Plus » [Plugin: Ambrosite Next/Previous Page Link Plus] Force Previous and Next and Remove Vertical Bar

Viewing 3 replies - 1 through 3 (of 3 total)
  • Okay I figured out 2nd part:
    ‘format’ => ‘%link » | ‘,
    (had vertical bar outside quote)

    Still wanna make the previous and next links mandatory for consistency.

    Thanks for help me! You’re welcome me.

    Figured it out, I was having trouble with array and if statements meant to keep navigation off parent which is placeholder. Also made first and last inactive when those pages are loaded.

    Here’s result and code maybe it’ll save someone some time

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <a href="http://l7world.com/webcomics/smurfmen">http://l7world.com/webcomics/smurfmen</a>
    "First | Previous | Next | Last"
    
    <?php if ( is_page (218) )  {
    } elseif (!previous_post_link_plus( array(
    'order_by' => 'post_date',
    'order_2nd' => 'post_date',
    'meta_key' => '',
    'loop' => false,
    'end_page' => 'fixed',
    'thumb' => false,
    'max_length' => 0,
    'format' => '%link | ',
    'link' => 'First',
    'date_format' => '',
    'tooltip' => '%title',
    'in_same_parent' => false,
    'in_same_author' => false,
    'in_same_meta' => 'webcomics',
    'ex_pages' => '',
    'in_pages' => '',
    'before' => '',
    'after' => '',
    'num_results' => 1,
    'return' => ''
    ) ) ) {
    echo 'First | '; } ; ?>
    <?php if ( is_page (218) )  {
    } elseif (!previous_post_link_plus( array(
    'order_by' => 'post_date',
    'order_2nd' => 'post_date',
    'meta_key' => '',
    'loop' => false,
    'end_page' => false,
    'thumb' => false,
    'max_length' => 0,
    'format' => '%link | ',
    'link' => 'Previous',
    'date_format' => '',
    'tooltip' => '%title',
    'in_same_parent' => false,
    'in_same_author' => false,
    'in_same_meta' => 'webcomics',
    'ex_pages' => '',
    'in_pages' => '',
    'before' => '',
    'after' => '',
    'num_results' => 1,
    'return' => ''
    ) ) ) {
    echo 'Previous | '; } ; ?>
    <?php if ( is_page (218) )  {
    } elseif (!next_post_link_plus( array(
    'order_by' => 'post_date',
    'order_2nd' => 'post_date',
    'meta_key' => '',
    'loop' => false,
    'end_page' => false,
    'thumb' => false,
    'max_length' => 0,
    'format' => '%link | ',
    'link' => 'Next',
    'date_format' => '',
    'tooltip' => '%title',
    'in_same_parent' => false,
    'in_same_author' => false,
    'in_same_meta' => 'webcomics',
    'ex_pages' => '',
    'in_pages' => '',
    'before' => '',
    'after' => '',
    'num_results' => 1,
    'return' => ''
    ) ) ) {
    echo 'Next | '; } ; ?>
    <?php if ( is_page (218) )  {
    } elseif (!next_post_link_plus( array(
    'order_by' => 'post_date',
    'order_2nd' => 'post_date',
    'meta_key' => '',
    'loop' => false,
    'end_page' => 'fixed',
    'thumb' => false,
    'max_length' => 0,
    'format' => '%link | ',
    'link' => 'Last',
    'date_format' => '',
    'tooltip' => '%title',
    'in_same_parent' => false,
    'in_same_author' => false,
    'in_same_meta' => 'webcomics',
    'ex_pages' => '',
    'in_pages' => '',
    'before' => '',
    'after' => '',
    'num_results' => 1,
    'return' => ''
    ) ) ) {
    echo 'Last '; } ; ?>
    Plugin Author ambrosite

    (@ambrosite)

    Yes, that is exactly what I would have suggested — checking the return value of the function in an ‘if’ statement. I also have sample code for that in the plugin documentation. I am marking this thread as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Ambrosite Next/Previous Page Link Plus] Force Previous and Next and Remove Vertical Bar’ is closed to new replies.