Articles of advanced custom fields

Last modified field for user profile?

Is there a plugin or a known way to track user profile changes and save a last modified date in WordPress? I tried with ACF, but it doesn’t have an option to auto update this field. Thanks in advance.

Archive filter disappears on no results?

I have been working through this example: That a colleague of mine found for creating a simple checkbox-based filter for WordPress custom posts, that filters by a custom post type. I’ve got it all set up and it seems to be working here – , if you filter by ‘Place’ then the ‘All Locations’ […]

Minimising Database Queries when using Advanced Custom Fields

I’m working on a page which lists staff members for a large company and trying to minimise the number of times I’m forced to query the database as it gets quite complex and slow. ‘person’ is a custom post type (there are about 300 people) ‘date_accredited’ is a date field added via Advanced Custom Fields […]

Query between dates using date picker filter breaks in WordPress 4.2.1

Original post: Query between dates using Date Picker fields I originally made a post last year on this same subject, but seems the update to WP v4.2.1 has broken my filter. In summary, I am using ACF and date picker plugin in an Events custom post type. I am trying to query events between a […]

Advanced Custom Fields Image Field returning ID instead of URL

I’m using ACF to add custom fields to a User. I’m trying to output these fields to the front-end. I was able to pull all fields, but when I was trying to get the img it wouldn’t pull. Here’s my code: <?php $user_id = get_query_var( ‘author’ ) ?> <?php $clan_member_info = get_userdata($user_id); ?> <p><?php if(!empty($clan_member_info->psn_id)) […]

Sorting posts by season

What would be the best way to go about creating something like this ( in WordPress? This is a calendar, with posts (containing the event date and event description), separated by year. A thought doing something like this, but I do not know, if this is a good solution, or if it is possible: Creating […]

How to: Display ACF on Custom Post Types Utilising WordPress 'Hooks'?

Sub-questions: i) Which files/templates need to be copied to the child theme folder, other than function.php and style.css? ii) What actions/filters/ should be used and where should this code be inserted? Apologies, if the following is worded inaccurately, I’m a WP beginner. I’ve recently installed the Customizr 4.0.8 [as a child theme] on a Localhost, […]

Change content before writing to database

I’ve searched around but I can’t quite pin down the answer for this. I am attempting to use the content of a custom field as post_data and save it to the database as such when a post is created or updated. I need to do this in order to make a frontend posting solution work […]

Faking the “onSave” event

While a specific use-case, I believe this may benefit others. I am using TurboCSV to mass-import a number of posts into WordPress (which it is doing wonderfully so far). Within that import, I am specifying custom fields to be used in conjunction with Advanced Custom Fields to store/output the data. The post_meta table is being […]

How to Increment ID value within ACF Repeater Field Loop

The code below is meant to display an Advanced Custom Fields Repeater field. I need to have unique values for the “for” attribute of the Label tag, and for the ID value of the trailing checkbox input field. Also, in order for the field label to work correctly, I need the “for” value to match […]