Custom archive template not showing pagination
-
I’ve created a few custom templates for my genesis theme and I cannot get the post navigation to work. I’ve spent many hours looking and trying code to no avail. Any help would be great. Here’s my template
`add_action( ‘genesis_loop’, ‘custom_do_loop’ ); // Add custom loop
function custom_do_loop() {
global $post;
// arguments, adjust as needed
$args = wp_parse_args(
genesis_get_custom_field( ‘query_args’ ),
array(
‘post_type’ => ‘post’,
‘posts_per_page’ => 10,
‘post_status’ => ‘publish’,
‘cat’ => $include,
‘paged’ => get_query_var( ‘paged’ ) )
);global $wp_query;
$wp_query = new WP_Query( $args );
if ( have_posts() ) :
while ( have_posts() ) : the_post();
echo ‘<div class=”post entry”>’;
echo ‘<h2> <a href=”‘ . get_permalink() .'”> ‘. get_the_title() .’ </a> </h2>’; // show the title
echo ‘<a href=”‘ . get_permalink() .'” title=”‘ . the_title_attribute( ‘echo=0’ ) . ‘”>’; // Original Grid
echo ‘</a>’;
the_excerpt();
echo ‘</div>’;
endwhile;
endif;
wp_reset_query();
}// Remove header, navigation, breadcrumbs, footer widgets, footer
add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );remove_action( ‘genesis_header’, ‘genesis_header_markup_open’, 5 );
remove_action( ‘genesis_header’, ‘genesis_do_header’ );
remove_action( ‘genesis_header’, ‘genesis_header_markup_close’, 15 );
remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
remove_action( ‘genesis_before_loop’, ‘genesis_do_breadcrumbs’);
remove_action( ‘genesis_before_footer’, ‘genesis_footer_widget_areas’ );
remove_action( ‘genesis_footer’, ‘genesis_footer_markup_open’, 5 );
remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
remove_action( ‘genesis_footer’, ‘genesis_footer_markup_close’, 15 );
genesis();`I’m not sure if my query arguments are wrong or if I’m missing a genesis action. Any help would be great.
- The topic ‘Custom archive template not showing pagination’ is closed to new replies.