the answer for all question about Oxygen Builder plugin and WordPress

Hey oxygurus.


Hey oxygurus.
I have been reading related posts for 1 hour, still can’t find a fix.
My pagination do not work in an static page.
I created a CPT “houses” and them a static page that shows all the houses in a repeater with a custom query that shows the CPT “houses”.
All good until I added my repeater, after adding it and click on it I just got “/houses/page/2

Definitely the template doesn’t renders there, even after adding the recommended code

query[‘post_type’][0] == ‘house’ ) {

$paged = get_query_var( ‘page’ );
$query->set( ‘paged’, $paged ? $paged : 1 );

$wp_query = $query;

}
}
add_action( ‘pre_get_posts’, ‘handle_pagination_on_frontpage’ );

/*
* Put following code AFTER the query
*/

remove_action( ‘pre_get_posts’, ‘handle_pagination_on_frontpage’ );

?>

Any idea guys?


Source

5 Comments
  1. Nikita Severin says

    You need to create a template for the cpt archive and not for a static page.

  2. Matija Ljevar says

    Is your CPT named house or houses?

  3. Darren Waggott says

    Iv was messing around with this last week, create the template for the cpt archive not page.

  4. Anwar Jacobs says

    Add to a code block before the repeater.

    matched_query);
    if ( !empty ( $args[‘paged’] ) ) {
    $wp_query->set(‘paged’, $args[‘paged’]);
    $paged = $args[‘paged’];
    }
    ?>

  5. Juan Carlos Garcia Alonso says

    Thank you very much guys

Leave A Reply

Your email address will not be published.

Oxyrealm Docs