pre get posts not working with Tribe Events
pre get posts not working with Tribe Events
pre get posts not working with Tribe Events
Include posts under a custom taxonomy in author.php
Admin products page column not sorting
Use this- function custom_tag_archive_query( $query ) { if ( is_tag() && $query->is_main_query() && !is_admin() ) { $tag = get_queried_object(); $tag_name = $tag->name; $similar_names = get_term_meta( $tag->term_id, ‘similar_names’, true ); $similar_names_array = explode( ‘,’, $similar_names ); $similar_names_array = array_map( ‘trim’, $similar_names_array ); $similar_names_array[] = $tag_name; // include the tag name itself in the search terms $meta_query … Read more
Search for meta_query does not return any result if combined with title
Figured it out, it was simpler than I expected. /** * Include catalog posts in archives, even though they’re not “public” * * @param WP_Query $query * @return WP_Query */ function wpse415668_catalog_posts_in_archives(WP_Query $query): WP_Query { if (! $query->is_admin() && $query->is_main_query() && $query->is_tax(“catalog_category”)) { $query->set(“post_type”, “catalog”); } return $query; } add_filter(“pre_get_posts”, “wpse415668_catalog_posts_in_archives”);
Hide empty categories on widget
Duplicating event posts in wordpress
Sorting by Title for Post Archive Categories for Custom Post Type
How to exclude first 2 posts from a specific category for a custom post type archive page