Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1220899
    cvdw
    Participant

    I added Next Previous navigation under posts in my site with Icon Stack by adding this code in functions.php of the child theme.

    function add_entry_navigation(){

    if( is_single() || x_is_portfolio_item() ) {

    the_post_navigation( array(

    ‘next_text’ => ‘<span class=”meta-nav” aria-hidden=”true”>’ . ‘Next’ . ‘</span> ‘ .

    ‘<span class=”screen-reader-text”>’ . ‘Next post:’ . ‘</span> ‘ .

    ‘<span class=”post-title”>%title</span>’,

    ‘prev_text’ => ‘<span class=”meta-nav” aria-hidden=”true”>’ . ‘Previous’ . ‘</span> ‘ .

    ‘<span class=”screen-reader-text”>’ . ‘Previous post:’ . ‘</span> ‘ .

    ‘<span class=”post-title”>%title</span>’,

    ) );

    }

    }

    add_action(‘x_before_view_global__comments-template’, ‘add_entry_navigation’ );

    This is working but how can I put this navigation boxed under the post and previous aligned left en next aligmed right? It’s now all at the absolute left site full width.

    Example at: http://www.vanderwyck.nl/wp/wintermood/

    #1221090
    Jade
    Moderator

    Hi there,

    Please add this code in the customizer:

    .nav-links {
        max-width: 1000px;
        width: 88%;
        margin: 0 auto;
    }
    
    .nav-previous {
        float: left;
    }
    
    .nav-next {
        float: right;
    }

    Hope this helps.

    #1223671
    cvdw
    Participant

    THX!

    #1223810
    Paul R
    Moderator

    You’re welcome! 🙂

  • <script> jQuery(function($){ $("#no-reply-1220899 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>