Pagination on custom post type

Posted in: Newspaper
Post count: 2

Hi Guys,
We use “Newspaper” theme with plugin “The Events Calendar”.
Plugin create custom post type events.
We created the page template that get all posts from custom post type and display them as category page (loop, work ok).
wp_query loop below

$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
 $event_query = new WP_Query(array(
    'post_type' => 'tribe_events',
    'posts_per_page' => get_option('posts_per_page'),
    'paged' => $paged,
    'orderby' => 'meta_value_num',
    'meta_key' => '_EventStartDate'
 ));

Below loop we add pagination like
echo td_page_generator::get_pagination();
and it’s not displayed on page

Can you help with it pls?
Did your pagination allow to use custom post type?
Does the problem in pagination function or something other?

Thank for your help

Post count: 780

HI,

please try this modification: http://screencast.com/t/3tSkukK5IwE

we are still investigating this issue. Sorry for the delay,
Radu O.

Post count: 2

Thank you
But problem was in my code.
Maine idea that query should be $wp_query and not $event_query.
After I change it and add global $wp_query above – pagination beginning work
I think this one can be closed

Sorry

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.