meta_query post_date not returning results
meta_query post_date not returning results
meta_query post_date not returning results
You can add taxonomy-subtopic-copyright.php and taxonomy-subtopic-trademark.php archive templates if you need that much granularity.
Pre defined checkbox / radio button state based on value stored in ACF fields in checkout form WooCommerce
wp_query returns all posts even with post__in and posts_per_page
You can do this using general programming/common sense with a variable and an if statement, no WordPress knowledge is required. If we create a variable named $skip_next and set it to true, then perform a check in the loop, we can set it to false and continue to skip the first. $skip_next = true; while … Read more
SOLUTION: I looked through Divi’s functions.php & saw that the term for the project tags is ‘project_tag’, so when I amended my $query args it now works! Thank you very much to everyone who responded 🙂 $query_args = array( ‘post_type’ => ‘project’, ‘post_status’ => ‘publish’, ‘order’ => ‘DESC’, ‘orderby’ => ‘date’, ‘posts_per_page’ => ‘3’, ‘project_tag’ … Read more
This cannot be done inside the tr tags, you need to separate this out into two stages. First collect the data ( without displaying any HTML ), then display that data. For example: $editor = new WP_Query( [ ‘posts_per_page’ => 20 ] ); // each item in this array will be a post/an array of … Read more
Try this WP_Query arguments: $args = array( ‘post__in’ => $all_ids, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘_event_date’, ‘compare’ => ‘EXISTS’, ), array( ‘key’ => ‘_event_date’, ‘compare’ => ‘NOT EXISTS’, ‘value’ => ‘dummy_value’ // This is just to ensure this condition gets evaluated. ) ), ‘orderby’ => array( ‘meta_value_num’ => ‘DESC’, ‘date’ => … Read more
You should really just forget about the first code in your post/question, but anyway, what you’re trying to achieve can be accomplished either by sorting at the database level or PHP level, and you would probably want to use the latter if pagination is not needed. But that is up to you to decide. Option … Read more
i need to return/echo the name of the department/location for each group of employees That is actually a generic PHP/programming question, nonetheless, if you mean an output which looks like so: Location/Department Name – Employee/user – Employee/user – Employee/user Location/Department Name – Employee/user – Employee/user Then here’s one way of accomplishing that: Add this above/before … Read more