Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

0 votes
Accepted

How to use meta_query to retrieve posts from multiple custom post type

$args = array( 'post_type' => array('meet_our_community', 'news'), 'post_status' => 'publish', 'posts_per_page' => -1, 'meta_query' => array( 'relation' => '...
Amal's user avatar
  • 1
0 votes

How to use meta_query to retrieve posts from multiple custom post type

Your query there is looking for results from either post type that have the meta value. AFAIK there's no way to do that in a single query unless you also add the checkbox to the other post type.
Chris Cox's user avatar
  • 1,277
0 votes
Accepted

WordPress API V2 - filter and order by ACF field

You could consider using the rest_{$this->post_type}_query filter hook to modify the result of certain REST API queries. To not mess with existing API calls, you could look at using new query ...
Wongjn's user avatar
  • 256
0 votes

Calculate order end date based on date and number of weeks ACF fields

This seems to have worked function UpdateEndDate($post_id){ //get start date and number of weeks $start_date = get_field('pick_up_date',$post_id); $weeks = get_field('number_of_weeks',$post_id); ...
nadyawell's user avatar
0 votes

Calculate order end date based on date and number of weeks ACF fields

You could consider working with unix timestamps (a numerical representation of a date and time that is the seconds elapsed since 00:00:00 1st January 1970). This makes the math easier since we would ...
Wongjn's user avatar
  • 256
1 vote

Redirect to File attached to a Post using ACF

The action redirect_to_acf_file_url doesn't exist, at least not in stock WordPress. You'll need to supply a proper action hook, and it'll need to be one that happens before any output is sent to the ...
Pat J's user avatar
  • 11.9k

Top 50 recent answers are included