How add pagination for Avada theme with pods plugin

1k Views Asked by At

I have a problem displaying the pagination of car photos.

I use the Wordpress AVADA theme and the PODS plugin with which I created the "cars" page with photos

I tried to modify the code in the pods.php file with this function

public function getPagination ( $label = 'Go to page:' ) {

        if ( Pod::$deprecated_notice ) {

        pods_deprecated( 'Pods::getPagination', '2.0', 'Pods::pagination' );
        $pod = pods( 'my_pod' );

        $params = array( 'limit' => 2 );

        $pod->find( $params ); 
    }

    echo $pods->pagination( array( 'type' => 'paginate');
}

I can't find the way to manage pagination directly in wordpress administration

1

There are 1 best solutions below

0
Dushyant Mangal On

Does your theme natively support the prev/next and pagination on the non custom post types? If it does, and you’re using the Pods Auto Frontier Template plugin to identify the Pods Templates to show for your pods, then you only need to change the ‘replace’ option for the Single Detail screen to to ‘after’. This will allow your theme to do most of it’s work correctly and ONLY replace where the theme calls for Post Content.

If you are using a shortcode, you need to add the following two parameters to your shortcode:

  1. limit="##" and set this to the number of posts you want on a page, and
  2. pagination="true", which will tell the template to honor pagination.