• Resolved tawshmcd

    (@tawshmcd)


    I’ve set up a CPT with pagination on the CPT single.php to loop through the posts to help with the user experience.

    Here’s the logic. There’s a page called ‘team’ with team members listed in alphabetical order. Once you click on a specific team member you’re given their profile with the ability to move to the next post from within the post. The next link works.

    The issue I’m having is that I can’t customize the posts that appear next within the pagination. They are appearing in order of date, and I’d prefer them to appear by order of title as they do on the main team page.

    When I add a query_post string above the loop it starts pulling in content from the blog and stops treating the page like a single.php.

    Help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tawshmcd

    (@tawshmcd)

    This is the code:

    <?php include(TEMPLATEPATH . '/assets/inc/header.php'); ?>
    
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    	<div class="row">
        	<div class="large-12 columns">
        		<div class="slider"><img src="<?php echo the_field('team-slider'); ?>" /></div>
            </div>
        </div><!--.row-->
    
        <div class="row">
            <div class="large-12 columns">
            	<div class="breadcrumb">< <a>" title="<?php echo get_the_title('5'); ?>">Back to Team</a> <span class="float-right"><?php next_post_link( '%link', '%title >' ); ?></span></div>
            </div>
            <hr />
        </div><!--.row-->
    
         <div class="row">
         	<div class="large-4 columns page-content">
            	<div class="plus-sign"><a>" title="<?php the_title(); ?>"><?php the_post_thumbnail('post-thumb'); ?></a></div>
            </div>
    
            <div class="large-8 columns page-content">
                <div class="post-details">
                    <div class="single-title"><?php the_title(); ?></div>
                    <div class="entry"><?php the_content(); ?></div>
                </div>
            </div><!--.large-8-->
         </div>
    
    	<?php endwhile; else: ?>
        <?php endif; ?>
    
    <?php include(TEMPLATEPATH . '/assets/inc/footer.php'); ?>

    [Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

    Thread Starter tawshmcd

    (@tawshmcd)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customizing Pagination for CPT Single’ is closed to new replies.