Hello,
I am having some issues with the Post to Post and prev and next buttons
This is what I have for the next posts
<div class="nav-next bx-next"><?php next_posts_link( __( 'Next →', 'boilerplate' ) ); ?></div>
<div class="number"><?php current_paged(); ?></div>
<div class="nav-previous bx-prev"><?php previous_posts_link( __( '← Previous', 'boilerplate' ) ); ?></div>
My connections
function my_connection_types() {
// Make sure the Posts 2 Posts plugin is active.
if ( !function_exists( 'p2p_register_connection_type' ) )
return;
// Keep a reference to the connection type; we'll need it later
global $my_connection_type;
$my_connection_type = p2p_register_connection_type( array(
'name' => 'art_to_artists',
'from' => 'art',
'to' => 'artist',
'admin_column' => 'any',
'reciprocal' => true
) );
}
add_action( 'wp_loaded', 'my_connection_types' );
My page that is pulling the artist information
<?php $artist = $post; ?>
<?php
global $my_connection_type;
// Find connected pages
$connected = $my_connection_type->get_connected( get_queried_object_id() );
// Display connected pages
if ( $connected->have_posts() ) :
?>
<?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
What I want to do is have a prev and next on top of each art piece and have it go to the next piece under that artist. Currently it is not doing that at all. Not showing up.
Thanks