962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says

Hey Guys,

I am pulling two custom post types into a loop and having a hard time getting the pagination to show, what am I doing wrong? :(


<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
                $args = array
                (
                    'post_type' ?> array('bingo_reviews', 'new_bingo_sites'),
                    'posts_per_page' => 1,
                    'paged' => $paged,
                    'caller_get_posts'=> 1
                );
                $custom_query = new WP_Query($args);
                while($custom_query->have_posts()) : $custom_query->the_post(); ?>

                    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                    <?php the_excerpt_rereloaded('45','More','','div','yes'); ?>

                <?php endwhile; ?>
                <?php wp_reset_postdata(); // reset the query ?>

                <div style="padding: 12px 0px">
                    <?php wp_pagenavi(); ?>
                </div>

147 posts
  • Bought between 10 and 49 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Sold between 250 000 and 1 000 000 dollars
FlexiPress says

try this

<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
                $args = array
                (
                    'post_type' ?> array('bingo_reviews', 'new_bingo_sites'),
                    'posts_per_page' => 1,
                    'paged' => $paged,
                    'ignore_sticky_posts'=> 1
                );
                query_posts($args);
                if (have_posts()) :
                while(have_posts()) : the_post(); ?>
                    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                    <?php the_excerpt_rereloaded('45','More','','div','yes'); ?>
                <?php endwhile; ?>
                    <?php wp_pagenavi(); ?>
                <?php endif; ?>
                <?php wp_reset_query(); ?>
962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says

Thanks man, but no go unfortunately :(

http://www.freenodepositbingo.co.uk/bingo-reviews/page/2/
PrimaThemes said
try this
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
                $args = array
                (
                    'post_type' ?> array('bingo_reviews', 'new_bingo_sites'),
                    'posts_per_page' => 1,
                    'paged' => $paged,
                    'ignore_sticky_posts'=> 1
                );
                query_posts($args);
                if (have_posts()) :
                while(have_posts()) : the_post(); ?>
                    

<?php the_title(); ?>

<?php the_excerpt_rereloaded(‘45’,’More’,’’,’div’,’yes’); ?> <?php endwhile; ?> <?php wp_pagenavi(); ?> <?php endif; ?> <?php wp_reset_query(); ?>
3117 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • Exclusive Author
chrisakelley says
962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says
3117 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • Exclusive Author
chrisakelley says
RedHenry said
OrganicBeeMedia said
http://themeforest.net/forums/thread/custom-post-types-pagination-and-404-not-found-pages/32264 http://themeforest.net/forums/thread/custom-post-types-and-permalinks-in-wordpress-31-rc/39380 theres a few more threads on it also
Thanks man, I don’t have any pages created at all though :(

how are you registering the custom post types? and what is your permalink structure

962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says
OrganicBeeMedia said
RedHenry said
OrganicBeeMedia said
http://themeforest.net/forums/thread/custom-post-types-pagination-and-404-not-found-pages/32264 http://themeforest.net/forums/thread/custom-post-types-and-permalinks-in-wordpress-31-rc/39380 theres a few more threads on it also
Thanks man, I don’t have any pages created at all though :(
how are you registering the custom post types? and what is your permalink structure

Through my functions.php file. I have made a template also called archive-bingo_reviews.php and my permalink structure is just / postname /

3117 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • Exclusive Author
chrisakelley says
RedHenry said
OrganicBeeMedia said
RedHenry said
OrganicBeeMedia said
http://themeforest.net/forums/thread/custom-post-types-pagination-and-404-not-found-pages/32264 http://themeforest.net/forums/thread/custom-post-types-and-permalinks-in-wordpress-31-rc/39380 theres a few more threads on it also
Thanks man, I don’t have any pages created at all though :(
how are you registering the custom post types? and what is your permalink structure
Through my functions.php file. I have made a template also called archive-bingo_reviews.php and my permalink structure is just / postname /
try adding something like the rewrite to your register_post_type(if you dont have it already)
register_post_type( 'archive_bingo_revoew',
        array(
                    'rewrite' => array('slug' => 'bingo-review')
            )
);
436 posts Don't be a HATER!
  • Exclusive Author
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Has been a member for 4-5 years
webinpixels says

do you still use wp_reset_postdata(); in your loop?

try to move it after wp_pagenavi();

good luck :)

by
by
by
by
by
by