I expected this to work, but it does not. Frontity can not fetch my Quote CPT, as it gets REST API error. If I remove orderby: "menu_order", itās working as expected. I am doing something wrong, or itās a bug?
Thanks!
Sounds like it might be a bug in frontity! Weāre investigating on our end, but in the meantime could you:
Post the error message that you receive.
Check if the same error occurs if you add the query parameter directly to the url in api like: https://mysite.com/wp-json?order_by=menu_order and remove the orderby: "menu_order", from params.
If I do not use the Quote CPT, then itās working as expected.
I do not really understand your second question.
If I use globally e.g. orderby: author, and on my Quote CPT orderby: date, then my code is working, but the Quotes will be ordered by author and not by date. (as Quote can be ordered by author). So I get the error only because Quote can not be ordered by menu_order (which I do not want anywayā¦).
Hey @mmczaplinski!
Yes, Iām aware of that. As I wrote, I do not want to order the quotes by menu_oder but by date.
But here is an other example where the bug is visible, without menu_order:
I write following into my frontity.settings.js to set the order globally to slug, but the Quote to date:
What you are trying to achieve is currently not possible with Frontity, unfortunately. We do not support the params inside of postTypes at the moment, although I admit that it was reasonable on your part to expect it to work this way!
I have opened a new feature request for this so that you can see what the status of it is in the future!