I’m trying to figure out how to fix my pagination problem while filtering out posts on the fly. I have a dropdown box just above the category archive that...
I’m trying to filter archive_research.php to show only the research with status=current. In functions.php: add_action( 'pre_get_posts', 'only_current' ); function only_current( $query ) { if ( $query->is_main_query() ) { $args...
I have a pre_get_posts filter to show exclude some posts on the homepage. But I can’t exclude the posts which are closed for commenting. How do I do this?...
So I have custom taxonomy called “cars”. I would want that when user does search, it would also search through taxonomy. Meaning that in “cars” taxonomy if I have...
I have Taxonomy called topic. If user land this archive page like example.com/topics/wordpress/ I need to out all posts which has wordpress word in title or description. I added...
I’m building an advanced search form, where I want to use the normal text field, tags,categories and also some custom fields. I created a form with all the values...
I’m trying to display all posts and only certain custom posts on the homepage. Essentially: (post_type = post) OR (post_type = exhibition AND featured = 1) I’m stuck with...
I’m going round in circles with trying to include several custom fields in my search results. The custom fields are managed via ACF. At first I want this for...
I’m trying to apply the pre_get_posts to a specific core/query block, in order to programatically modify the number of posts displayed when a custom attribute is set. If I...
I have a custom post type ‘events’, to which I have associated a custom taxonomy ‘calendar’. The calendar has 12 fixed terms, for each month of the year (...