3 Jul 14

- Tagged in "Guides" / Page 5 -

Get values from a widget

All the template functions (get_field, the_field, etc) can be used to load values from a widget, however, a second parameter is required to target the term. This is similar to passing through a $post_id parameter to target a specific post object. The $post_id parameter needed is a string containing the the word ‘widget_’ and the […]

Continue Reading

3 Jul 14

How to get values from a comment

To display custom field values within comments, you will need to setup a custom callback function for the wp_list_comments() function. This is well explained in an article Creating a custom comment list. All template functions can be used w... Continue Reading

13 Mar 14

Debug, diagnose and solve

When customizing your theme with ACF functionality, you may experience some issues. These issues may resemble a blank page, a broken page, a value not being loaded or a visible error report. Although frustrating at first, these issues are i... Continue Reading

13 Nov 13

Creating a WP archive with custom field filter

This video tutorial will cover the basics of creating a WP archive that displays posts filtered by a checkbox custom field. Please watch the video first, and use the code below to kick start your project! Usage This snippet of code is place... Continue Reading

10 Sep 13

Hiding empty fields

Overview It is a common task to hide empty field values from your template. This can be achieved by using conditional statements to check the value before rending it. The basics to conditional a statement is to use an if statement. You can ... Continue Reading

20 Aug 13

Order posts by custom fields

This article will demonstrate how to retrieve and sort an array of post objects from the database using native WP functions. There are many ways to query posts in WP, however, this article will make use of the common get_posts function, WP_... Continue Reading

13 May 13

Using acf_form to create a new post

This article will cover how to create a form on the front end of your website to add new content. Getting started If you have not already, please familiarize yourself with the acf form functions. Two functions are available to create a work... Continue Reading

23 Apr 13

Get values from another post

All the template functions (get_field, the_field, etc) can be used to load values from another post, however, a second parameter is required to target the post. Each post has a unique ID which can be found in the URL when editing, or found ... Continue Reading

3 Mar 13

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 ... 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