• Resolved berniemann

    (@berniemann)


    Hi, is it possible to set the pagination type through the pods shortcode?

    Making the query in php, I can choose between three pagination types: simple, advanced, and paginate. But when I make the query via shortcode [pods name=”pods” pagination=”true” etc…], the pagination type shown by default is ‘advanced’ and I would like to use one of the other paginators. So is it possible to set the pagination type in the shortcode? (something like pagination_type=”paginate”)

    Thank you very much!
    PD: I like pods!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @berniemann

    I’ve created a patch that adds this functionality:
    https://github.com/pods-framework/pods/pull/5978

    When using this patch you can use the pagination param to set the type, not sure set it to true.
    Let me know if this works for you!

    Cheers, Jory

    Thread Starter berniemann

    (@berniemann)

    Hi Jory, thanks for answering.
    I’m not sure if I’m following the correct steps…

    I have updated the pods/includes/general.php by copying the new file on my wordpress site.
    Now the paginator isn’t showing when making the query via shortcode. What syntax should I use? None of this is showing any paginator:

    pagination=”true”
    pagination=”simple”
    pagination=”advanced”
    pagination=”paginate”
    pagination=”true simple”

    I’ve reverted the general.php file and the paginator is shown again by using pagination=”true”.

    Thanks for your assistance.

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @berniemann

    I’ve refactored the patch to use a separate pagination_type param as you suggested. This was indeed required for backwards compatibility.
    Could you test again?

    Cheers, Jory

    Thread Starter berniemann

    (@berniemann)

    Fantastic Jory! It is working now!

    I’ve used the following sytnax:
    [pods name=”movies” pagination=”true” pagination_type=”paginate” etc…].

    I have also tried the other paginator types with success: pagination_type=”simple” and pagination_type=”advanced”.

    Is the patch going to be added in the next plugin update?
    Thank you very much!

    Bernie

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @berniemann

    Thanks for testing!
    Once the PR is reviewed and accepted it will be added into Pods core ??
    You can follow progress on GitHub!

    Cheers, Jory

    • This reply was modified 3 years, 11 months ago by Jory Hogeveen.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Pagination type via pods shortcode’ is closed to new replies.