Questions tagged [advanced-custom-fields]

Advanced Custom Fields is a free WordPress plugin which acts as a GUI layer for custom fields. Custom fields are native to WP and appear on pages, posts and custom post types, however the native custom field interface is not very user friendly. ACF uses field groups to attach fields to edit screens.

Advanced Custom Fields is a free WordPress plugin which acts as a GUI layer for custom fields. Custom fields are native to WP and appear on pages, posts and custom post types, however, the native custom field interface is not very user-friendly. ACF uses field groups to attach fields to edit screens.

More information and good documentation are available on the official website. The plugin can be downloaded from the WordPress plugin repository or installed from within the WordPress admin.

Useful Links

4522 questions
4
votes
1 answer

add_row in ACF Pro isn't saving repeater values

My Situation I'm using Advanced Custom Fields Pro to store metadata for a post in wordpress. My posts are created dynamically (not through the administrative interface), which means that I explicitly need to populate metadata using field keys, not…
slifty
  • 13,062
  • 13
  • 71
  • 109
4
votes
2 answers

Duplicate Term with get_the_terms()

I'm having some difficulty listing a custom post type with unique category/taxonomy headings. I have a ACF reverse relationship and currently have two articles under category 1 and one article under category 2. Next, I'm attempting to loop through…
Jon Nixon
  • 155
  • 4
4
votes
3 answers

Wordpress: Get the select field option choices in ACF (Advanced Post Field) plugin?

I'm now using Advanced Custom Fields Plugin in wordpress. And now I defined some Choices, and they have Choices set as below: Field Name: time_availability Field Type: Select low : Once or twice high : Several times So, I want to enumerate these…
Alfred Huang
  • 17,654
  • 32
  • 118
  • 189
4
votes
1 answer

Get the parent taxonomy custom field with Woocommerce and ACF

I use Woocommerce and Advanced Custom Fields to manage products. I would like to show a parent taxonomy image on sub-taxonomy pages. Actually, I use this snippet to get the image on the taxonomy parent page (it works):
Lucien Dubois
  • 1,590
  • 5
  • 28
  • 53
4
votes
4 answers

Advanced Custom Fields get sub field image

I have a sub field in ACF, named 'imgcolumn_1'. This is set to be an image, and allows the user to add an image. Now, when in PHP, I am trying to retrieve the input the user adds. For example, I have another sub field in AFC called column_1, which I…
user2209033
4
votes
1 answer

WooCommerce Category and ACF

I'm using the Advanced Custom Fields (ACF) Plugin. On the WooCommerce product category, I want to have a content area for seo. ACF would help me but doesn't work, as nothing is shown on the front end of the site. content-product.php has the the…
Kieselerd
  • 65
  • 1
  • 6
4
votes
1 answer

Retrieve posts by custom field with WP-REST-API in Javascript

What is the right URL to retrieve posts by meta_query with the WP-REST-API? The custom field I want to use can contain multiple values, I tried this for custom field which only can contain a single value and this works.…
colin
  • 425
  • 2
  • 5
  • 17
4
votes
1 answer

Get ACF-fields into CF7 as mail tags?

I have a wordpress website which announces courses on a regular basis, using posts. Any vistor can apply for the course directly on the post page (by typing in name, adress, phone, mail, etc.) via the Contact Form 7-plugin. I then get the…
Liu Kang
  • 1,359
  • 4
  • 22
  • 45
4
votes
2 answers

Display post as featured if taxanomy matches current category

I have used ACF. I have added the 'taxonomy' select dropdown field to the post edit page. From the dropdown I select which category this post should be featured in, but my code is displaying the same post as featured across all categories. Below is…
wharfdale
  • 1,148
  • 6
  • 23
  • 53
4
votes
1 answer

WordPress: How to sort content by ACF custom field?

With use of the Advanced Custom Fields plugin I created a select dropdown which contains 6 membership types. All of my 'listings' using this custom field are assigned one of the 6. I'd like to display all 'listings' by: Ultimate…
wharfdale
  • 1,148
  • 6
  • 23
  • 53
4
votes
0 answers

Advanced Custom Field: custom button does not appear

I have created custom plugin that show a custom button in TinyMce Editor. Work fine with classic Wordpress editor but button doesn't appear in acf WYSIWYG editor. Here my code: add_filter('mce_external_plugins', 'tinyMceCustomShortcodesInit'); …
mariobros
  • 859
  • 4
  • 12
  • 31
4
votes
1 answer

WP Advanced Custom Fields - True/False field if/else statement

I'm using an ACF Radio Button field to toggle the display of code based on ticking "yes" or "no". Like this: some stuff here some other stuff…
dadra
  • 153
  • 1
  • 3
  • 15
4
votes
1 answer

ACF update_field associated with a User

I've created some custom fields on the user profile page in WordPress. I've managed to build a front end editor for the user to change some e-mail preferences:
lukeseager
  • 2,365
  • 11
  • 37
  • 57
4
votes
2 answers

Advanced Custom Fields – Custom Field Type with multiple inputs

I am trying to create a new field type for ACF that contains multiple inputs or stores an array of values. The reason is that I would like to have some interactivity and a custom layout for a group of input fields. I followed this tutorial…
gang
  • 1,758
  • 2
  • 23
  • 36
4
votes
2 answers

WP query looping through custom post type working on homepage but not on search page

I've got two custom post types called Artists and Paintings. Both the post types have a custom field called artist name created using Advanced Custom Fields plugin. I need to be able to match the custom fields from both these post types, with each…
NJT
  • 334
  • 5
  • 19