Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
I got it! For any one in the future with the same problem: ACF’s get_field_object() apparently makes a WP_Query and doesn’t clean up after so, since I called it for every post, I always got the same post after a certain point in the elaboration. I found the solution in this question. Some code for … Read more
Using Advanced Custom Field for file upload, how do I load the file url
This is a little more complicated. You have to loop through the elements first, and create a twodimensional array containing weekday and time. $entries = array(); while ( have_rows(‘tag’) ) : the_row(); //clean thisentry $thisentry = array(); // set aufguss and sauno for thisentry $thisentry[‘aufguss’] = get_sub_field(‘aufguss’); $thisentry[‘sauna’] = get_sub_field(‘sauna’); // populate array for wochentag/uhrzeit … Read more
You are just confusing the array levels, ordering is not done inside the meta_query level but on the main query level. It is the difference between two classes: https://codex.wordpress.org/Class_Reference/WP_Query https://codex.wordpress.org/Class_Reference/WP_Meta_Query Also, as the meta query codex says: “Custom field value can be an array only when compare is ‘IN’, ‘NOT IN’, ‘BETWEEN’, or ‘NOT BETWEEN’”… … Read more
This is not the way which you have clled for ACF. Parameters <?php $field = get_field($field_name, $post_id, $format_value); ?> $field_name: the name of the field to be retrieved. eg “page_content” (required) $post_id: Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / … Read more
Looks like your problem is in the content-project.php file. Whenever using WP_Query() make sure to use wp_reset_postdata(); Additional details can be found here
No, out of the box there isn’t. There are alternatives but the best solutions will require knowledge of your reason for wanting this. For example, if your goal is to show full quotes on the homepage and avoid a box that’s too large and disrupts the design, you could have: A CSS based solution A … Read more
Custom fields (wp_post_meta) vs Custom Table for large amount of data
Convert your string of IDs into a proper array: $exclude_ids = get_field( ‘exclude_pages’ ); $exclude_array = explode( “,”, $exclude_ids ); Then pass $exclude_array as the value for post__not_in.