Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1079341
    Juhani J
    Participant

    I’ve used the following code in my functions.php to add Next and Previous navigation arrows under my portfolio page content to easily move from one portfolio item to next.

    
    add_filter('the_content', 'next_prev_urls', 9999 );
    
    function next_prev_urls ( $content ) {
    
    if( is_singular('x-portfolio') ) {
    
    ob_start();
    
    x_entry_navigation();
    
    return $content.ob_get_clean();
    
    } else return $content;
    
    }

    This works really well but the problem is some portfolio pages are very long, so the viewer has to scroll to the bottom to reach those arrows. Thus I would like to put the same arrows to the portfolio’s sidebar as well, specifically into the div.entry-extra. How would I achieve that?

    #1079386
    Juhani J
    Participant

    I’m using a Renew stack.

    #1079779
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    You have to edit this file \wp-content\themes\x\framework\views\renew\content-portfolio.php and copy to your child theme (with same folder structure/path)

    Then add <?php x_entry_navigation(); ?>

    Cheers!

    #1080105
    Juhani J
    Participant

    Thanks, this works beautifully!

    All the best!

    #1080120
    Thai
    Moderator

    You’re most welcome 🙂

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