Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #90774

    Tricia L
    Participant

    Hello,

    I would like to be able to add pagination (to the previous/next portfolio item of the same category) to my single portfolio page. Is that possible?

    The projects & products page are each a portfolio category.

    Thanks,
    tricia

    Site: http://www.thecaveworkshop.com
    Wordpress version: 3.9.2
    Theme version: 2.1.0 with child theme
    Shortcode plugin: 2.3.4

    #90796

    Kosher K
    Member

    Hi Tricia,

    You can use x_entry_navigation() function.

    Set-up a child and copy x/framework/views/renew/wp-single-x-portfolio.php to x-child-renew/framework/views/renew/wp-single-x-portfolio.php

    Then edit it and add x_entry_navigation() on the template.

    it should look like this

    <?php
    
    // =============================================================================
    // VIEWS/RENEW/WP-SINGLE-X-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Single portfolio post output for Renew.
    // =============================================================================
    
    ?>
    
    <?php get_header(); ?>
      
      <div class="x-container-fluid max width offset">
        <div class="x-row-fluid">
          <div class="x-main full" role="main">
    				<?php x_entry_navigation(); ?>		
            <?php while ( have_posts() ) : the_post(); ?>
              <?php x_get_view( 'renew', 'content', 'portfolio' ); ?>
              <?php x_get_view( 'global', '_comments-template' ); ?>
            <?php endwhile; ?>
    
          </div>
        </div>
      </div>
    
    <?php get_footer(); ?>

    Hope that helps.
    Cheers

    #94604

    Tricia L
    Participant

    Hello,

    The pagination showed up. However, it is now on the top left of the page. is it possible to move it the under the post and center align it?

    I tried to move the pagination to the end of the article in the code, but it didn’t work. A little help please.

    <?php
    
    // =============================================================================
    // VIEWS/RENEW/WP-SINGLE-X-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Single portfolio post output for Renew.
    // =============================================================================
    
    ?>
    
    <?php get_header(); ?>
      
      <div class="x-container-fluid max width offset">
        <div class="x-row-fluid">
          <div class="x-main full" role="main">		
            <?php while ( have_posts() ) : the_post(); ?>
              <?php x_get_view( 'renew', 'content', 'portfolio' ); ?>
              <?php x_get_view( 'global', '_comments-template' ); ?> 
            <?php endwhile; ?>
            <?php x_entry_navigation(); ?>
          </div>
    
        </div>
      </div>
    <?php get_footer(); ?>

    Thanks,
    tricia

    #94609

    Paul R
    Moderator

    Hi Tricia,

    Try the code below.

    
    <?php
    
    // =============================================================================
    // VIEWS/RENEW/WP-SINGLE-X-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Single portfolio post output for Renew.
    // =============================================================================
    
    ?>
    
    <?php get_header(); ?>
      
      <div class="x-container-fluid max width offset">
        <div class="x-row-fluid">
          <div class="x-main full" role="main">		
            <?php while ( have_posts() ) : the_post(); ?>
              <?php x_get_view( 'renew', 'content', 'portfolio' ); ?>
              <?php x_get_view( 'global', '_comments-template' ); ?> 
            <?php endwhile; ?>
            
          </div>
          <?php x_entry_navigation(); ?>
        </div>
      </div>
    <?php get_footer(); ?>
    

    Then to center it.

    You can add this under Custom > CSS in the Customizer.

    
    .x-nav-articles {
        text-align:center;
    }
    

    In case it still doesn’t work. Would you mind providing us your login details.
    You can do that by setting your reply as private.

    Thanks