How to update custom taxonomy meta using ACF update_field() function or any other wordpress function

I figured it out somehow.. Syntax of update_field(): update_field($field_key, $value, $post_id) MY MISTAKE: I was using the wrong parameter for the $post_id which i thought was the Term Id of the custom taxonomy term. CORRECT USAGE: rather than using term id ($term_id in my question), one should use a string with the taxonomy preppended to … Read more

Get full image array

The “full array” is constructed by Advanced Custom Fields from various sources. It’s not a format that occurs natively in WordPress. If you want to output an image tag for an image with all the correct attributes, just use the ID with wp_get_attachment_image(). That returns an HTML <img> tag with the src, width, height, alt, … Read more

Loop with array of posts using ‘Advanced Custom Fields’ plugin [closed]

http://codex.wordpress.org/Function_Reference/paginate_links <?php echo paginate_links( $args ) ?> Disclaimer: I’m not familiar with the Advance Custom Fields plugin. The pagination would have to be setup before you enter into the WordPress loop. Taking a count of all the available posts stored inside the the $post_objects, you would pass that variable into the paginate_links function. You’ll also … Read more

How to customize a divs background dynamically using Advanced Custom Fields Plugin?

You can apply a style to the header <div> (or the <header> element), and then add an inline style using wp_add_inline_style(). For example, let’s say you’ve got something like this in your header.php file: <header id=”masthead” class=”site-header” role=”banner”> (Cribbed from the Twenty Twelve theme.) Let’s say you’ve set up the neighborhood’s color as post meta-information … Read more

Query Custom Post Types by date (custom field) range

I think it’s mainly because of the type parameter. You are probably looking for meta_query. Take a look at the following example from the codex: $args = array( ‘post_type’ => ‘my_custom_post_type’, ‘meta_key’ => ‘age’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, ‘meta_query’ => array( array( ‘key’ => ‘age’, ‘value’ => array(3, 4), ‘compare’ => ‘IN’, ) … Read more