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
3
votes
2 answers

Illegal string offset for 'url' when using WordPress Advanced Custom Fields

I am converting a Bootstrap template into a WordPress theme. For custom fields I am using the plugin Advanced Custom Fields. The issue is when I am trying to add an image with the help of Advanced Custom Fields, I get the following error: Warning:…
Yaser Basravi
  • 51
  • 1
  • 1
  • 7
3
votes
2 answers

ACFs : How to change default values / settings

Using Advanced Custom Fields, Say anytime i want an image field, i need it to output an array as default. Or anytime i use a wysiwyg, i don’t want it to show the media button Need a textarea ? i want it with no formatting as default. How can i…
jDelforge
  • 129
  • 4
  • 15
3
votes
1 answer

How do I append text in ACF for field type repeater?

Sometime I will have 2 links or 1 link. I want to add "or" between the 2 links. So if there are 2 links, add "or" For example,…
waisie
  • 43
  • 3
3
votes
3 answers

Add Advanced Custom Fields to WooCommerce Product Variation

I am using plugins called Advanced Custom Fields (ACF) and WooCommerce. I want to create a text and image field for WooCommerce product variation. I created fields in ACF and assigned them to "Post Type" > "product_variation". But for I don't see…
3
votes
2 answers

pulling alt and title from ACF image array

Trying to pull alt and title tag for a image via ACF using the image array. This is what I have been doing and it seems to work most of the time but I can't get it to work this time. Here is my code. See anything off?
Dan Crowe
  • 115
  • 13
3
votes
1 answer

ACF programmatically add repeater

I'm using Advanced Custom Fields (ACF) and trying to add a repeater programmatically to an existing group (group_5621b0871e1b1), but it doesn't work. The same code works for a text field but not for the repeater. In my plugin: add_action(…
Oterox
  • 642
  • 1
  • 10
  • 27
3
votes
4 answers

how to get image url in advanced custom field wordpress post

I have created a custom post type called "albums". I have 5 custom fields in my each post. 3 text fields, 1 image field and 1 file upload field. I'm getting 3 text values correctly in my template page. but I can't get the url part of image and file…
Vadivel Murugan M
  • 105
  • 1
  • 6
  • 16
3
votes
3 answers

WordPress: Advanced search for custom post types and custom fields

I have the following problem. I am trying to create a real estate website with wordpress. I have created a custom post type and I included the following fields with Advanced custom fields: Listing type (select: For sale, For rent), Property type…
Dpetrov
  • 31
  • 1
  • 4
3
votes
2 answers

ACF loop Repeater values with get_field

I created a Custom Field with the Repeater layout to add some input text. I would like to display all the values. I found some code on ACF documentation but I can't understand how it works
Maki
  • 199
  • 2
  • 4
  • 13
3
votes
2 answers

Get only the next date from multiple dates

I have several dates, some of the past, some of the future, and I want to show only the next date in the future of this list. If there is no date in the future, I want to echo some text. I am using ACF Date Picker inside a Repeater. First of all, I…
Marian Rick
  • 3,350
  • 4
  • 31
  • 67
3
votes
1 answer

Create an array() from ACF repeater

I'm trying to create several arrays of data from a repeater. There are 3 columns to each row; bus_type band_food band_no_food The first col is TEXT and the other 2 are select lists. What I'd like to do is loop through the results and depending on…
user1235285
  • 87
  • 2
  • 17
3
votes
1 answer

Advanced Custom Fields repeater image caption

I am trying to display an image caption for a wordpress Advanced Custom Fields (ACF) repeater field, and haven't had any luck with the follow three options:
Eames
  • 31
  • 3
3
votes
1 answer

Advanced Custom Fields Sub_Field in Archive Page

I am using ACF plugin with repeater addon in Wordpress, Normally in archive.php I can use get_field or the_field functions and these are showing posts' data. (ex: title) In single.php there is no problem, When i want to use the_sub_field or…
Ekin
  • 43
  • 1
  • 6
3
votes
2 answers

target a WooCommerce category's advanced custom field

I'm trying to get the advanced custom field for a WooCommerce category. With the following code I get the woocommerce categories: $categories = get_terms('product_cat'); var_dump($categories); But why isn't any ACF info included? Is there…
Master Deo
  • 65
  • 7
3
votes
2 answers

How do I show a hyperlink in a PHP if statement in Wordpress?

I'm trying to add the following rollover image with a link inside of a PHP if statement. but the hyperlink disappears when it is executed ">Access Application"; …
Eli
  • 61
  • 8