tax_query not working on main query
I’m using the following code to do a tax_query and it doesn’t seem to work anymore..
I’m using the following code to do a tax_query and it doesn’t seem to work anymore..
I’m making a one page site. On the page I want to run WP_Query three or four times to pull in those 3-4 pages.
Bulding off of this response from @kaiser about being able to filter by post types on a search page, I wanted to be able to automatically add-in all of the public post types available. So, after some help with @kaiser, I came up with:
I am using a custom post type that uses two taxonomies “colour” and “style”. I have a script (from this thread) which groups them together so when you are on a colour taxonomy page they are grouped by style like this:
I know there are a lot of threads about similar issues, but I can’t figure out why my custom sort won’t work in the category admin page. Here is my code to add the ACF field as a column to the category page and register the sorting ability. For some reason the add_action( 'pre_get_posts', 'category_custom_orderby' );
hook isn’t working. Is there something I’m overlooking? Or is there some other way to get the sorting function to work?
I am designing my first theme and I am stuck on the search functionalities of a Custom Post Type.
I created a CPT ‘movies’ and created the archive page with the ‘archive-movies.php’ file in the root of the theme folder. Inside I created a basic WP_Query
In refactoring my code base I noticed there are two hooks that used for modifying the main query.
I’m trying to apply a Datefilter for specific categories.
So here is my problem
I want to show Posts if have same category if not have post then show post of same tag. And to do that I am using “pre_get_posts” action. and setting query like following.