Is there any possible to implement the pagination for custom post type in Genesis child theme, I’m using Genesis : 2.0.2 and WordPress version is : 4.0.
I’ve tried the following code in my template, but it’s not working for me.
<?php echo genesis_posts_nav(); ?>
And my normal category pagination also not working for me in my genesis child theme.
<?php echo genesis_posts_nav(); ?>
My Custom Template Code Here :
<?php
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'sk_do_loop' );
function sk_do_loop(){
$args_spotlight_latest = array('posts_per_page' => 5,'post_type' => 'spotlight', 'post_status'=>'publish','meta_key' => 'featured_slider','meta_value' => 'true');
$spotlight_posts_latest = new WP_Query($args_spotlight_latest);
/** Content Area **/
if($spotlight_posts_latest->have_posts()){
while($spotlight_posts_latest->have_posts()){
$spotlight_posts_latest->the_post();
$feat_image = wp_get_attachment_url(get_post_thumbnail_id());
..............
..............
..............
}
}
genesis_posts_nav();
}
?>
Can anyone help me in this.
Thanks in advance.
use this code , it will sure work, issue with static page
Here is the final code :
?>
It’s working great 🙂