3 Mar 13

- Tagged in "Guides" / Page 8 -

Dynamically Populate a Select Field’s Choices

Need to dynamically populate a field’s choices? This tutorial shows how to take a value saved to an options page and use it to override the choices array for a Select field. The ‘choices’ array attribute is also used with the Radio Button and Checkbox fields. Most of this tutorial applies to any of these […]

Continue Reading

3 Mar 13

Get Values From a User

All the template functions (get_field, the_field, etc) can be used to load values from a user, with a second parameter required to target the user. This is similar to passing through a $post_id parameter to target a specific post object. Th... Continue Reading

3 Mar 13

Adding fields to Media Attachments

This guide will demonstrate how to add custom fields to a WordPress Attachment and how to then display these fields. All the template functions (get_field(), the_field(), etc) can be used to load values from a media attachment, however, a s... Continue Reading

3 Mar 13

Adding Fields to a Taxonomy Term

This guide will demonstrate how add custom fields to a Taxonomy Term and then modify the term’s template file HTML. Terms can be items such as WordPress categories, tags or other custom taxonomies that have been added to your site. For ex... Continue Reading

3 Mar 13

Get values from an options page

All the template functions (get_field, the_field, etc) can be used to load values from an options page, however, a second parameter is required to target the options page. This is similar to passing through a $post_id parameter to target a ... Continue Reading

19 Feb 13

Sort a Repeater Field

This article will cover how to sort a repeater field based on it’s sub field values using a function called array_multisort(). Getting started The following examples assume a repeater field exists containing 2 sub field; ID (number fi... Continue Reading

19 Feb 13

Register multiple options pages

Multiple options pages can be registered by making use of the acf_add_options_page() and acf_add_options_sub_page() functions. Both functions can be used within the theme functions.php file. Once registered, each options page will appear wi... Continue Reading

19 Feb 13

Querying relationship fields

This tutorial will cover the techniques to query relationship fields in both directions. The example used will be “Doctors” and “Locations”. Screenshots To save time, this tutorial will not cover the setup process fo... Continue Reading

19 Feb 13

Working with Nested Repeaters

Creating and displaying nested repeater / flexible content fields is very easy using the Advanced Custom Fields plugin. This article will demonstrate how to build a simple to-do list that uses a nested repeater to output groups of items. Fi... Continue Reading