Questions tagged [advanced-custom-fields]

**NOTE** Support for this plugin is off-topic. Support questions should be asked on the plugin's support page.

0
votes
1answer
15 views

Compare meta key to current date in pre get post

I'm looking for a way to compare a string to the current time. I found this question "pre_get_posts filter using numeric meta_query comparison (from dates)" and I'm confused as to get it to work. $...
0
votes
1answer
15 views

ACF meta_key and meta_value break loop

I have a CPT with post type of 'recipe'. I have several ACF Advanced Custom Fields in the CPT. My loop WORKS correctly when it is written like this: <?php // args $args = array( 'numberposts'...
0
votes
0answers
27 views

ACF don't save the selected value

firstly i created a select dropdownlist using acf that dynamically populate like this: add_filter('acf/load_field/name=chef', 'my_acf_load_chef_field'); function my_acf_load_chef_field( $field ) { ...
0
votes
1answer
31 views

Ajax a php file that has Advanced Custom Fields in it

I am trying to AJAX in a php file that uses Advanced Custom Fields fields, and get a 500 internal error when making the request. The php file works fine if I just use ‘include’, but I need to have it ...
0
votes
0answers
10 views

How to use WP Backery on Wysiwyg ACF

One of my client use ACF and WP Backery. I need to use the backery editor to include a specific component, but it must apply on a wysiwyg ACF. For the moment, I can apply the WP Backery editor only ...
0
votes
1answer
33 views

Count custom post types with a specific meta value

We have a custom type called books. In a template, we need to show the counts of books that have the book_type as Fiction Non Fiction Novel Short Stories We use ACF Pro, and the above field is set ...
0
votes
1answer
34 views

get_template_part() not working with Advanced Custom Fields plugin

I work on the WordPress project I created testimonials in a special file called testimonials.php and I called the file on the page about us by get_template_part and it works fine but when I called (...
0
votes
0answers
11 views

search results to show individual ACF fields from inside custom posts

In need of some help. I have my search results showing the custom post type with all the ACF fields inside. What I want is the search result to show the ACF singularly with a field name of file_name ...
0
votes
0answers
17 views

Taxonomy shows up twice on Custom Post Type

I created a new Custom Post Type called Articles & Issues. I then created a new taxonomy called authors on this CPT. I then went into Advanced Custom Fields and created a field group called ...
0
votes
2answers
12 views

List all ACF field values across every post on one page

I used an ACF repeater field for data sheets/instruction manual download links of products in woocommerce. There's 50 products and each has 1 to 4 download links on their product page. I've been ...
0
votes
0answers
9 views

WPSiteSync & Advanced Custom Fields

I'm using the plugin WPSiteSync which can copy posts from one wordpress install to another. It works well however I’m using Advanced Custom Fields with a Relationship field. When it copies over posts ...
0
votes
2answers
32 views

wp query multiple values > display a specific value first

I have a query that get relationship fields for multiple ID. I get the ID of selected item, and merge it in an array with other ID's ex : my page relationship ID = 5 my other pages ID in array = 6,...
0
votes
1answer
14 views

Custom function making troubles in get_permalink for ACF relationship fields

I'm using a custom function to add .html to my custom posts & pages, working with WPML. This script is creating a bug on ACF relationship field permalink. My custom function : function ...
0
votes
1answer
10 views

How to use germ_terms() with meta_query for ACF Taxonomy field?

I have a custom taxonomy, Events (“event”). Through ACF, this also has a Taxonomy field, “Topic”, linking it to a secondary taxonomy, Topic (“topic”). I want to get_terms() for all Events terms ...
-1
votes
0answers
14 views

How to create a Parent and Child Woocommerce Product and connect them?

Please help, I'm just new to PHP and WordPress. So here's the scenario, I have an ACF radio button in Woocommerce product that has value 'parent' and 'child'. What I want to do with it is that if I ...
0
votes
0answers
11 views

Generating list of dates with php, breaks when I add ACF to get the numbers [on hold]

I'm trying to generate a list of billing dates based on user profile meta (with ACF). In the user's profile, you can set the day/month/year and number of payments that will be made, and on the ...
0
votes
0answers
12 views

How save gravityforms image (uploaded) to acf field?

I created custom field for post type next i designed form with gravityforms for submit post. User fills the form and send it. All custom field (like text box and other) worked except gallery's field. ...
-1
votes
0answers
9 views

wpDiscuz acf image field as a user avatar

i use wpDiscuz for user commenting.. and useing ACF image field for user avatar. problem is that wpDiscuz use gvatar for user avatars. But i want to use Advanced custom image field for user avatar . ...
0
votes
0answers
10 views

Check if there are posts with specific ACF field value in current archive query posts

I developed a custom ACF field archive filter which lets you filter posts with ACF fields - similar to Woocommerce product attribute filters. It loops thru all fields in a field group and echos all ...
0
votes
1answer
30 views

Save_post acf data not updating category of post type

i am trying to assign multiple categories to my Custom Post Type using advanced custom field named 'cat'. But there is nothing saving to my categories. Any help? <?php // Add an action to run on ...
0
votes
1answer
16 views

Get list of posts from attachment

My gallery has dozens of images. Next to each image, there should be links to the posts attached to that image. (You can see these in Media Library, under "Uploaded To"). I am able to retrieve the ...
0
votes
1answer
22 views

WP Query with meta queries

I have the following WP_Query: $query = new WP_Query(array( 'post_type' => 'some_cpt', 'posts_per_page' => -1, 'meta_key' => 'active', 'meta_value' => 1, '...
-2
votes
0answers
31 views

Show taxonomy list with taxonomy ACF images [duplicate]

i have a taxonomy list in the home page made with https://wordpress.org/plugins/wp-categories-widget/ plugin .. i crated image field for taxonomies with ACF. i can show tax image on archive page but i ...
0
votes
1answer
18 views

help with really simple csv importer

( sorry for the title, but i dont know how to explain this as a title ^^ ). I'm using really simple csv importer to bulk import data in my site, using Advanced custom fields. So i need to import ...
0
votes
2answers
40 views

How to copy data from a custom field to the post_content?

i used ACF to store post data in custom fields. i'd like to copy the data from a wysiwyg field to post_content into wp_posts table. How can i do this? Roughly: data is on wp_postmeta table, where ...
0
votes
1answer
39 views

ACF & Bootstrap Gallery Shows Blank Slides [closed]

I've been working on an ACF Gallery that uses the bootstrap carousel style. I've got it to work but it seems to create an extra loop instead of closing it after the last image. This is the code I ...
0
votes
1answer
47 views

How to define the template for custom posts?

I created a new custom type called 'books' and I created a Field using the Advanced Custom Fields plugin where I define the fields and create the records, with post names such as book1, book2, etc. I ...
0
votes
2answers
17 views

Hide Posts In Back-end/Admin Based On User's (Pseudo) Privileges Controlled by ACF

I'd like to disable access to posts in the back-end/Admin from a user that doesn't have the privilege to view those posts. This will function similar to the Author role however this "privilege" is ...
0
votes
1answer
29 views

Videos Post Type with Custom Filters

Basically, I am trying to achieve exactly same as in this link: https://www.fitnessblender.com/videos In my WordPress site, the first thing I did was creating a post type 'videos'. I am not sure ...
0
votes
0answers
19 views

Weird custom fields data lost

I'm experiencing a weird issue with my WordPress. I'm around this for almost two months. Can someone please help me? Please be my life savior... The issue: When I publish a post with data in all ...
0
votes
0answers
13 views

Getting custom field dynamically from variable

I feel like this should be relatively easy but for some reason I'm lost. I'm trying to access an associated posts ACF repeater field based on what row is being outputted. Here's the query in ...
0
votes
0answers
15 views

Textarea output from options page is different other custom textarea / ACF / Timber Twig / Email Encoder

I have a job archive where a summary of every job is listed. Underneath every single short-description I need the same text-block - containing an email address and a postal address. To make it easier ...
0
votes
0answers
17 views

Permalink URL connection between two custom types

We use latest WP 5.2, and the super plugins Advanced Custom Fields Pro (ACF Pro) and CPT UI. In our website taxonomy, we need to have events, within which we have talks and workshops. Example ...
1
vote
0answers
32 views

Display custom field without plugin in woocommerce

See I have a problem / I now want to display a custom field in a place where this field has several options that I tick if I see it in the product tab. If I do not show, do not display the following ...
0
votes
1answer
14 views

Looking for a javascript callback action to re-initiate a custom slideshow in gutenberg

I'm using the new Gutenberg Blocks in ACF to build a custom slider, but I need a way to re-initiate BXSlider(the library I'm using for the slider) after every change made on the block. I'm looking in ...
0
votes
0answers
9 views

Add different image in Advanced Custom Field based on qTranslate selected language

My website is in two languages and I am using Advanced Custom Fields and qTranslate plugins. In one page, where I have these Advanced Custom Fields, I added heading and image. When I switch languages, ...
0
votes
0answers
31 views

Load default image on button click via AJAX

I'm trying to load a default image into a custom field on button click using AJAX. I've created a CPT and assigned some custom fields using ACF to the CPT. One of the fields is an Image field to ...
0
votes
0answers
24 views

Display Specific Posts at Start of Loop

I'm attempting to mimic 'sticky' functionality on a custom post type using a simple ACF true/false field. I'd like to use pre_get_posts to modify my query to first show my 'sticky' posts at the top ...
0
votes
0answers
33 views

How to show link to product in custom fields?

I'm a noobie and I have a question that's probably very simple to many people. I'm using Advanced Custom Fields, and WP Data Tables (https://wpdatatables.com/). I made a custom post type "PC", and ...
-1
votes
1answer
20 views

Advanced Custom Fields Image Crop

When a user uploads an image using the ACF Image field, and a maximum height and width is set, is there a way in which an image menu could appear (like the one WordPress already has in the media ...
1
vote
1answer
103 views

How to get “Additional CSS Class” for ACF Gutenberg block

I have registered a custom block with ACFs acf_register_block. I have set a render_callback to load a php template but would like to access any extra CSS classes which the user may have set in the ...
0
votes
0answers
31 views

Custom query showing all acf field values instead of the one searched

add_action('wp_footer', 'ajax_fetch'); function ajax_fetch() { ?> <script type="text/javascript"> function fetch() { jQuery.ajax({ url: '<?php echo admin_url('admin-...
0
votes
1answer
30 views

Conditional multidimensional arrays and array_map

I'm using Roots Sage 9, which uses Laravel within WordPress, and am combining this with Advanced Custom Fields. For this, I have created a Controller, where I use an array_map to iterate through the ...
0
votes
1answer
10 views

Javascript Tab Gallery with Advanced Custom Fields

I'm using Advanced Custom Fields on my site, i want to display pictures for my gallery field on a presentable, elegant way. So i was thinking on do something like this: https://www.w3schools.com/...
0
votes
1answer
32 views

Advanced Custom Fields Gallery and Flex Slider [reformuled]

I want to display the gallery with Flexslider like in the tutorial here: https://www.advancedcustomfields.com/resources/gallery/ So i went to the Flexslider site and followed the steps: https://...
1
vote
0answers
32 views

Put a Contact Form 7 in post template

I already read other post where they were asking the same: ACF + contact form 7 I must say that the solution didn't work for me. The contact-form keeps sending the emails to the email address set on ...
0
votes
0answers
16 views

Hide Menu Items from guess user with ACF

I want to know is there any way to hide some menu item from guess user, with ACF plugin. I know there is a lot of plugins with the build for this reason. but I want to just use ACF. Is it possible?
0
votes
0answers
34 views

Advanced Custom Fields oEmbed video width and height

I'm using Advanced Custom Fields plugin and i have a oEmbed field in it where i want to display YouTube videos. This is how they look now: http://electives-abroad.org/custom-field-test/ Why do they ...
0
votes
1answer
42 views

Meta Query “IN” doesn't work with ACF checkbox filter

I try to integrate to my CPT archive page some ACF filters. I start with this tutorial : https://www.advancedcustomfields.com/resources/creating-wp-archive-custom-field-filter/ It works when I use it ...
0
votes
2answers
45 views

How to output values from a loop into a javascript array

I'm building a custom shortcode in Wordpress. Essentially what I want this to do is the following: Dynamically pull values from a group of Advanced Custom Fields Output those values into a javascript ...