Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is it possible to add pagination to the single.php for a Custom Post Type, such as single-items.php. On this single page, I am using the Posts 2 Posts plugin (http://wordpress.org/plugins/posts-to-posts/) to get all connected custom post types that are connected to the Item custom post type. I would like to paginate these connected posts on this single page. How would I go about doing this?

Thank you.

share|improve this question

closed as off-topic by toscho Aug 15 at 22:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

This includes a hook for genesis however you can easily change it and the name of your portfolio slug.

function wpsites_npp_navigation_links() {
if( 'portfolio' == get_post_type() && is_single() ) {?>
<?php previous_post('&laquo; &laquo; %', 'Previous', 'no'); ?>
 | <?php next_post('% &raquo; &raquo; ', 'Next', 'no'); ?>
} }
* @author Brad Dalton
* @learn more http://wp.me/p1lTu0-9YH
add_action('genesis_after_post_content', 'wpsites_npp_navigation_links', 5 );
share|improve this answer

This is not an easy thing to fix, but I found one solution.

Essentially you need to turn off the canonical redirect by adding the following to your functions.php (or plugin).

function vee_disable_redirect_canonical($redirect_url) {
if (is_singular('YOUR_PAGE_SLUG')) $redirect_url = false;
return $redirect_url;
add_filter('redirect_canonical', 'vee_disable_redirect_canonical');

Good luck


share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.