the answer for all question about Oxygen Builder plugin and WordPress

I have a custom post type that also uses a custom taxonomy for its category. Thi


I have a custom post type that also uses a custom taxonomy for its category. This way it isn’t sharing the category with normal Posts.
I have an Oxygen template to serve the archive page for these categories and show the posts in them.
I use a Repeater module set to the default query.
So far this all works as normal.

I installed a plugin which lets me set a custom sort order on a per-category basis. https://wordpress.org/plugins/reorder-post-within-categories/

The main issue is that despite using the default query, the custom sort doesn’t work and it continues to basically display as date DESC.
The plugin has an override where it can force the query to only use the custom sort. This works, but will break anywhere on the site that queries for these posts using any other sorting techniques.

That said, I’m thinking the plugin only works if the default query does not contain any sorting value. The CPT is set up using Advanced Custom Fields: Extended. Within the settings there is an option for sort and direction. I have set this field to blank, just an empty box, and DESC, I can’t make that one empty. This didn’t work though.
So clearly WP (or ACF Extended) is setting an ordering anyway and so the custom sorting tool isn’t taking effect unless I force it.
Is there a way to make ACF Extended NOT output the orderby for the query? Or likewise make WP not set the orderby for a default query to the CPT category archive?
I’m assuming this would end up being a custom filter or hook, but I don’t want to run into the same issue where my custom filter would override any other custom repeaters or queries across the site.
All I want is for the default query to not contain a sortby, but any other custom repeaters and queries left alone. I know there is some kind of is_default_query or something that could also be used.
Any direction would be helpful.



Source

Leave A Reply

Your email address will not be published.

Oxyrealm Docs