pre get posts not working with Tribe Events
pre get posts not working with Tribe Events
pre get posts not working with Tribe Events
Your query might be picking up sticky posts. To ignore them, try this: $args = array( ‘meta_query’ => array( array( ‘key’ => ‘featured_posts’, ‘compare’ => ‘==’, ‘value’ => ‘0’ ) ), ‘post_type’ => ‘post’, // Changed ‘3’ to 3, since WP_Query expects an int. ‘posts_per_page’ => 3, // Ignore the sticky posts. ‘ignore_sticky_posts’ => true, … Read more
I think I’ve understood your question, and I hope this can help. To display a hero section with the most recent posts without interfering with the main loop and pagination, you can use a combination of WP_Query for the hero section and pre_get_posts() to modify the main query. Here’s the code to achieve this: // … Read more
Rewrite URL custom search query
Include posts under a custom taxonomy in author.php
I don’t know much about elementor, but to keep this as a Purely WordPress answer you need to change your query to sort by post name. The code you provided looks like a pre-query filter so you should try this: add_action( ‘elementor/query/kunst_op_kunstenaar’, function( $query ) { $query->set( ‘order’, ‘ASC’); $query->set( ‘orderby’, ‘title’); } This sets … Read more
Hot to show custom post type taxonomies on archive page
Get URL parameters with rewrite rules
I found two possible solutions to my problem : 1. the link to the post should not use permalink the problem is actually that a draft post has a permalink with its post_id instead of post_name, as explained here : How to make draft posts or posts in review accessible via full url / slug? … Read more
Can I make a Heading block above a query loop block disappear when that query loop has no results?