WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
How to duplicate 5 posts out of WP_Query results?
For the left side you could do this, <?php $args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 10, ‘paged’ => get_query_var(‘paged’) ? get_query_var(‘paged’) : 1, ); $loop = new WP_Query( $args ); // add custom function before loop, so you can apply excerpt filter only to this case do_action(‘my_custom_pre_loop_action’); // is url parameter set, if … Read more
Is it a good idea to improve meta query performance by adding tax query?
I just re created the category. Deleted the old category and created a new category with the same name, and now it`s ok. The pages were imported with the native WordPress import-export plugin, from another wp installation, with the category as well (the category was automatically created when I imported the pages), maybe something went … Read more
How to filter, restrict and return posts based on custom user meta information
How to get only return parts of WP_Query result for performance?
Make a page return false to is_single() and true for is_post_type_archive() before wp_enqueue_scripts
I manually added a “featured” meta key to 2 different posts with values of 1474 and 2213 and then ran a basic WP_Query() like so: $qv = [ ‘meta_query’ =>[ [ ‘key’ => ‘featured’, ‘value’ => [1474, 2213], ‘compare’ => ‘IN’, ] ] ]; $r = new WP_Query($qv); It pulled up both posts. This was … Read more
Orderby is working with one query but not with other