I have a meta key which I would like to use to get all post meta data for a post where that one meta key
want to query 100 posts, but only those which do not have a featured image attached. I am using meta_key method for this with WP_Query
is there a possibility of filtering posts by terms using regexp? My code doesn’t quite seem to work. $tax = [ 'taxonomy' => 'tax_name', 'field'
is there a possibility of filtering posts by taxonomies using regexp? My code doesn’t quite seem to work. $tax = [ 'taxonomy' => 'tax_name', 'field'
<?php $args = array( 'posts_per_page' => 1, 'category_name' => 'news', ); $news_query = new WP_Query( $args ); if ( $news_query->have_posts() ) : $html_out = '<article
I updated my code. I swapped returns with echoes. The only issue is that the post_thumbnail_url isn’t pulling into the background of div. <?php $args
I’d order post by meta_key but i’ve a problem with meta_value because is some post have (0) value, So my query get only all post
Backstory We have a bunch of events inside an events custom post type. They each have the following custom fields associated to them: start_date end_date
My client has a custom theme which’s has a custom option for selecting the featured image for any post. The current default view for selecting
I have a form that has 3 fields: Genre, Label, Era. Depending on if the field is left blank or not, I need to do
I’m trying to show some posts sorted by some custom criteria using the following code: $myargs = array( 'post_type' => 'projects', 'post__in' => array(10188,10033,9239,9145,6075,5103,4963,5057,6767,5097,4725), 'posts_per_page'=>
Reposting since I think I messed up the original post and it got rejected… I am trying to figure out the args for a WP_Query
I am trying to figure out the args for a WP_Query that will return products that are ordered by first one custom variable and then
I am in the process of rewriting a lot of my code and restructuring a lot of my theme files to use template parts (i.e.
I have a WP_Query with rewind_posts that I use to filter posts if they belong to a particular category. Basically, if any post belongs in
I’m looking for a way to bring a post if it’s in a certain category to the front (or top) of the list. The category