How to set different per_page for each custom post type?

 "name": "@frontity/wp-source",
        "state": {
          "source": {
            params: {
              per_page: 5,

In the frontity settings i’m able to set a per_page param but it applies to all post types

According to the doc :


Object of params that will be used in every call to the WP REST API when using actions.source.fetch . This is useful to filter fields from the REST API, change the default per_page value and so on…

I am wondering, how can i set different per_page param for each custom post type?
Let’s say i want 5 articles per page, but 10 testimony per page and so on…

Should i do it with libraries.source.api.get + libraries.source.populate or is there a simplier approach?


I think you can’t do that directly in frontity. I don’t know if it works for you, but maybe it does: You can add that parameter to the endpoint of the taxonomies: