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
5
votes
1 answer

Change output last item in loop (ACF)

I'm still learning php, but can't get my head on this one. For a loop in Wordpress I want to output a list with places, seperated with a comma and ending with a point. Here's my code:
Falch0n
  • 305
  • 1
  • 3
  • 11
5
votes
2 answers

Custom wordpress meta query (no result)

Problem I am looping through custom post types (Advanced Custom Fields) in Wordpress. I only want to display events with start_date equal to $newdate variable, defined in the beginning. The start_date is in the format YYYY-MM-DD HH:mm (the same as…
rmilosic
  • 103
  • 7
5
votes
2 answers

WordPress: ACF add rows to a repeater field

I'm looking for a way to add rows to a repeater field in ACF Pro. I found this post but the solution post doesn't seem to work. I will describe my problem: I have a custom post type called "gebruikers", a repeater field called "logins" and a rows…
vespino
  • 1,714
  • 3
  • 15
  • 28
5
votes
2 answers

Advanced Custom Fields (ACF) Pro acf-json workflow

My team just switched to using acf-json and we have some questions about how to treat the files in terms of a team using git. The question is basically, should we always commit the .json files when they show as modified and should each team member…
Joel Stransky
  • 380
  • 1
  • 5
  • 17
5
votes
2 answers

Images not visible in search results

I have this custom search function to search trough custom meta keys in Wordpress. The function works well. However, all the images that I have added to my post using Advanced Custom Fields are now having their URL's changed to the attachment…
Forza
  • 1,619
  • 3
  • 28
  • 49
5
votes
3 answers

Output Fields Of Entire Group Advanced Custom Fields

I'm trying to find a way (using the wordpress plugin ACF) to output an entire group of fields. I have two "Field Groups" and I want to say if either of them is "Active" (with a checkbox) to echo them to my template. The question is, how do I get an…
Thomas
  • 523
  • 2
  • 9
  • 23
5
votes
5 answers

how to display wordpress acf custom fields in front end form posting

In my project I need to display custom post fields form on front end , so I have installed ACF and created custom filed , now my issue is how to render these fields along with the HTML ???? I used get_fields() function , still it won't…
user1452840
  • 221
  • 1
  • 4
  • 9
5
votes
3 answers

Update wordpress post from front-end (using acf)

I am making front end admin for users to add/edit their posts. I already made post add form and it works, but edit form doesnt work. functions.php function add_new_post( $post_id ) { if( $post_id == 'new' ) { // Create a new post …
Rokas
  • 1,712
  • 2
  • 18
  • 35
4
votes
1 answer

Polylang version 3 has a bug and it is incompatible with Advance Custom Field (ACF)

Polylang version 2 is working well with Advance Custom Field (ACF) I want to update my website and use the latest version of Polylang which is version 3.3.3 in this situation I can see a bug in Polylang: 1- I create an article and add an image in…
Raskul
  • 1,674
  • 10
  • 26
4
votes
0 answers

Can't render multiple innerblocks with ACF Blocks. How do I make them unique?

I'm using ACF to create two blocks, Tabs and Tab. Tabs is the container with innerblock that only allowes Tab block. Tab block has the innerblock that any block. As I've read from multiple forums this is how it's suppose to be done to allow multiple…
4
votes
1 answer

ACF - How can I get all the fields of a field group

I have multiple fields on a field group called Membership Level Feature and which post id is 5112. Now, I want to get all the fields of this post id. I am using: echo '
';
print_r( get_fields(5112 )  );
echo '
'; But getting empty…
Shibbir
  • 1,963
  • 2
  • 25
  • 48
4
votes
0 answers

Understanding srcset in Wordpress and why it's not working

I am really struggling to understand how Srcset works in Wordpress. I have added my custom sizes like so: // Make sure featured images are enabled add_theme_support( 'post-thumbnails' ); // Add featured image sizes add_image_size(…
Mr Toad
  • 202
  • 2
  • 12
  • 41
4
votes
1 answer

Filtering on an ACF Post Object-field in wordpress in Gatsby and GraphQL

This is follow up question on Querying wordpress with meta queries from Gatsby After a bit debugging I've gathered, and please correct me if I'm wrong, that Gatsby on build downloads the entire data structure and caches it. So all the GraphQL…
Borje
  • 255
  • 5
  • 19
4
votes
1 answer

Programatically update an ACF field for all posts when an ACF options page is updated

I have a custom post type set up with some ACF fields. I also have an ACF options page set up. I'm trying to update a text field on all custom posts with a value from a text field within the options page, when the options page is updated. Here's…
AJT
  • 216
  • 2
  • 6
  • 31
4
votes
1 answer

Adding ACF image field in navigation not showing up

I am trying to add an image to the header.php navigation using Advanced Custom Fields PRO, However, it does not show up. I have tried various solutions such as (in functions.php): add_filter('wp_nav_menu_items', 'my_wp_nav_menu_items', 10,…
qulpe
  • 41
  • 2