Nested array issue in meta_query
I am using following meta_query to search blog post according to following search criteria, search logic : if expire date set, check the expiry of the post, otherwise just include it if...
View ArticleGet result from meta_query() between two numbers
I have value like :- if ( ! empty( $_GET['filter-area'] ) ) { $f = $_GET['filter-area']; preg_match_all('!d+!', $f, $matches); foreach($matches as $key) { $first_val = $key[0]; $second_val = $key[1]; }...
View Articlepre_get_posts order by not working
I am using the pre_get_posts hook to alter a query before it runs. The posts in question are performances and so are date and time based. I want to alter the query to get all performances which are in...
View ArticleAdvanced WP_Query with meta_query, orderby?
I wonder if anyone can help me with this little complex query with ACF. I have the following so far which should display: Pages, News Articles, About Articles and Involved Articles. Show: only 4. Only...
View ArticleConditional posts in WP_query for search
I have a custom post type that im trying to limit results in search. The CPT is a deal/coupon, with a start and end date for each of the deals. What I’m trying to do is only show these posts in search:...
View ArticleMeta Box Plugin – Adding field value inside echo
I am using Meta Box Plugin to add some custom options to my Page Edit. I added a field to add an image background to the header which is working great. This image background has a parallax background...
View ArticleWP_Query meta query not returning results as expected
I’m trying to run a get_posts query to determine if a users ID is either set as a meta key value or is included within the array of another meta key for an event on a given date. I am passing $status,...
View ArticleIs it possible to retrieve all posts with a certain value for metadata?
Under 4.5, I have posts with meta_key as series and meta_value as 19, 20, etc I am trying to loop through them in a template, and I guess I’m a special kind of dense. Most recently I have tried $args =...
View ArticleShow list users based on two custom field values
I’m kinda stuc. I have added an extra field in the user profile for my authors, called ArtistCategory which can be Tattoo or Piercing. I’m using this key and value to filter for menu and gallery...
View ArticleTwo near-identical custom field types – one works, the other doesn't . What...
I’m using Advanced Custom Fields to add meta information to a custom post type and in ACF I’ve created two different ‘Select’-dropdowns – one is called ‘series’ the other ‘classification’. I run a...
View Article