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
1
vote
1 answer

Invalid argument supplied for foreach() when deselecting an Array

The code down below displays an array of flicker images from a plugin that works with Advanced Custom Fields. The problem I have is if I had previously selected a gallery to show but now deselect it I get an error 'Warning: Invalid argument supplied…
1
vote
2 answers

What's wrong with my relationship loop?

I'm having a problem with a relationship loop with Advanced Custom Fields in Wordpress. The first post is shown perfect, but it should execute one more post, but it doesn't. Can anyone see what's wrong with my code?
Henric Åkesson
  • 140
  • 1
  • 2
  • 11
1
vote
1 answer

WordPress: Create Menu with Values from Corresponding Page

I am using Advanced Custom Fields on my pages to create a field called page_color. The field is a select that allows for 4 different values. In my menu, I would like pages to appear automatically and have a class is-orange or is-green (or whatever…
Brandon
  • 11
  • 4
1
vote
2 answers

Wrapping an entire set of dynamic content with a div

I'm a PHP novice and I can't quite figure out where to put in some code within my PHP to wrap the outputted content in a div. As it stands, this outputs the echo twice, each around the "season_date" row and the "archive_entry" row. I'd like to wrap…
dotwongdotcom
  • 269
  • 1
  • 3
  • 10
1
vote
0 answers

Is there a way to obfuscate Wordpress file download URLs

Im using ACF to associate a custom file field to WooCommerce on my site. That field will receive the customers invoice PDF once the order is completed. My problem is the files have a sequence numbering, which is helpful to keep so I can quickly…
Luis Martins
  • 1,421
  • 2
  • 18
  • 32
1
vote
2 answers

WP advanced custom fields array if statement error

I'm using this to pull in a conditional value in Wordpress with advanced custom fields:

Branding

' .…
1
vote
0 answers

Advanced Custom Fields for Taxonomies (WordPress)

I'm setting up a marketplace-style website for local furniture makers and vintage shops, using WordPress with WooCommerce and the WooCommerce Vendor Stores plugin. In order to create more complete vendor profiles, I'm using Advanced Custom Fields to…
1
vote
1 answer

Getting the value of an Advanced Custom Fields box on a taxonomy

I have been tasked with creating a custom taxonomy ('sector') for a custom post type ('case_study'), on a WordPress site that already uses ACF. Everywhere online tells me that to get the field (an image specifically, called 'sector_image'), to use…
user3919287
1
vote
2 answers

Advanced Custom Fields: dirname( __FILE__) returning wrong URL on shared server for CSS and JS includes

I'm adding Advanced Custom Fields Pro (v5) to a simple plugin I'm creating. I'm using the tutorial on the ACF website: Distributing ACF in a plugin/theme. The tutorial calls for using get_stylesheet_directory(), but that is for a theme. I replaced…
Mark Rummel
  • 2,920
  • 10
  • 37
  • 52
1
vote
1 answer

Change lags on x-axis of acf graph

Is there a way to change the x-axis on an acf and pacf graph so that it starts at 1 and not at 0? here is an example graph: N<-c(34913.60, 25555.69, 33132.19, 40212.03, 21973.67, 28005.34,30182.27, 69070.89, 46548.21, 57806.81 , 49925.19,…
Summer Gleek
  • 334
  • 5
  • 15
1
vote
1 answer

Advanced Custom Fields on WPML translations not saving

On a page/post I can copy the Advanced Custom Fields with content to the translated page but when I edit the translated page it always gets overwritten by the Advanced Custom Fields content from the default language page. Trying to achieve: I need…
Timotheus0106
  • 1,536
  • 3
  • 18
  • 28
1
vote
2 answers

Advanced Custom Fields in Page template

I've recently been doing quite alot of work with Advanced Custom Fields in Wordpress, and find them incredibly useful when working with Posts, but cannot seem to get the same results when working with Pages. I currently have a page that uses a loop…
Steve Vincent
  • 199
  • 3
  • 15
1
vote
1 answer

How can I modify the value of an Advanced Custom Fields Post Object field via PHP?

I'm working on creating an import script to migrate data from an Excel spreadsheet that a client is providing, and converting each row into a WordPress post. So far, I've got the posts being created and all custom fields being filled in…
Nicholas Cardot
  • 956
  • 1
  • 11
  • 30
1
vote
1 answer

Adding Advance Custom Field field in Genesis Framework template

What can I do in order to add an ACF textarea into a Genesis child theme template. I tried a lot but did not find any way. Thank you.
fysalyaqoob
  • 71
  • 2
  • 9
1
vote
1 answer

WP: acf image fields & simple lightbox plugin integration

I'm trying to integrate the Simple Lightbox plugin into Advanced Custom Fields image fields. Basically I want any images on a page (populated via acf image fields) to open in the lightbox when clicked, and also be grouped together with all other…
dadra
  • 153
  • 1
  • 3
  • 15
1 2 3
99
100