Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [advanced-custom-fields]

OFF-TOPIC. Support questions should be asked on the plugin's support page.

Filter by
Sorted by
Tagged with
0 votes
2 answers
35 views

How to use meta_query to retrieve posts from multiple custom post type

I am having two custom post type "meet_our_community" and "news" I have added a checkbox field named 'add_to_meet_our_community' from the acf to 'news' post type. Now I when tried ...
Amal's user avatar
  • 1
0 votes
1 answer
18 views

WordPress API V2 - filter and order by ACF field

I have a custom post type called "crowdfunding" which contains two Advanced Custom Fields called campaign_start_date and campaign_end_date (in addition to several others). I'd like to create ...
commadelimited's user avatar
0 votes
2 answers
16 views

Calculate order end date based on date and number of weeks ACF fields

We have 3 ACF fields added to Woocommerce orders - start date (pick_up_date), number of weeks (number_of_weeks) and end date (end_date) Start date and number of weeks are manually entered and the ...
nadyawell's user avatar
0 votes
1 answer
33 views

Redirect to File attached to a Post using ACF

I'm trying to redirect users directly to the URL of the file located in a post using a File field from ACF. Something like: <?php function redirect_to_acf_file_url() { $file_url = get_field('...
a_y's user avatar
  • 1
0 votes
0 answers
13 views

Creating a Single Instance Custom Post Type with Limited Module Options using ACF and WPGraphQL

Hello WordPress community, I'm working on a project where I need to create a custom post type using Advanced Custom Fields (ACF) and query it via WPGraphQL to integrate with a Headless Next.js build. ...
Jason6's user avatar
  • 1
0 votes
0 answers
11 views

ACF: how to retrieve post id in acf/init hook?

please help me! I have a task to register a field depending on the post ID. I managed to do this. But when I try to save the value, it doesn't work! add_filter('acf/init', 'acf_load_my_field'); ...
Oleksiy Goldayev's user avatar
0 votes
0 answers
13 views

ACF: register subfields for existent parent "group" field depend on other fields post data with PHP

I really need help or advice from experts. My task is to create a set of text fields in the field type=group (which is created in the admin panel) depending on the value of the post fields. I’m ...
Oleksiy Goldayev's user avatar
0 votes
0 answers
9 views

How to use ACF fields content in backend?

I have created ACF fields with Flexible Layouts 'bhld-codes', with three layouts: 'bhld-use-code-css', 'bhld-use-code-js', and 'bhld-use-code-html'. Each layout has fields: Custom field type based on ...
D_P's user avatar
  • 143
0 votes
0 answers
17 views

Cannot Access ACF Field Values via my Plugin

Objective I am working on a WordPress site built using Timber/Twig. I have a plugin (built using standard PHP and saved in the standard plugins folder) that is supposed to grab ACF values from a ...
Isaac Hillaker's user avatar
0 votes
0 answers
11 views

Populate Elementor Form based on first selection

for better understanding, check this elementor tutorial https://youtu.be/wYv0tMFDFG0?si=cg2nQE6a5zl0FdHp&t=610 starting with 10:10 min, is what I need. Instead of Options 1, 2, 3, etc, I have ...
Vali Dragomir's user avatar
1 vote
2 answers
31 views

Generate Post Title From ACF Fields on Custom Post Type

I have tried a few versions of the code to get this working and seem to come up with a couple of errors either way. I am using ACF for the fields and adding the below code to the themes functions.php ...
Craig Watson's user avatar
1 vote
0 answers
21 views

WordPress pagination error when using ACF CPT rewrite slug & Polylang CPT slug translation

I use WordPress with Polylang PRO and ACF PRO plugins. Using ACF PRO I've created CPT with post_type 'aktualnosc', with rewrite slug 'aktualnosci' (same slug as page name (with posts list)). I also ...
NetPax's user avatar
  • 11
0 votes
0 answers
30 views

Advanced Custom Fields Auto Populating Field Values For Nested Repeater FIelds

So we have configured a filter to automatically populate ACF Fields from a custom post type and we have this working for a top-level flexible content block. However, we don't seem to be able to do the ...
Nick's user avatar
  • 1
0 votes
1 answer
31 views

Advanced Custom Fields - How do I get field values of a group within a group field type

I'm creating a Run Report page for a ski resort. I have created an ACF group calls Runs. Within this ACF group there are a number of ski runs that use the checkbox field with the values 'Day' 'Night' ...
Overspeed's user avatar
0 votes
0 answers
27 views

Not applying update field (acf) in my plugin

this is my plugin code <?php /* Plugin Name: Unique Auto VIN Fetcher Description: Fetches vehicle data using VIN from a specified API and fills the data in custom fields in posts. Version: 1.0 ...
Mohammad Oveissi's user avatar
0 votes
1 answer
35 views

Multisite, using switch_to_blog in filter

I am programming a hook for ACF to get a list of posts from another site in a network. so switch_to_blog(1); ... do some WP_Query... ...list results in an array ... restore_current_blog; in a ...
Chris Pink's user avatar
0 votes
1 answer
36 views

Unable to edit custom post type, editor crashes. What to do?

I have a custom post type, which also has a custom taxonomy. These have been defined via ACF. Editing posts of this custom post type results in the Wordpress editor crashing. This seems to happen when ...
MastaBaba's user avatar
  • 281
1 vote
0 answers
49 views

WP_query with ajax filter not working with input fields

I'm having trouble with my query when using ajax to filter the posts. I have a page where the posts of post type 'activiteiten' are loaded when the start_date custom field has today's date or a date ...
Thessa Verbruggen's user avatar
0 votes
0 answers
18 views

How to create advanced custom fields for backend content

Is there a straightforward way to create custom fields for module-based content on WordPress? Example: User Creates page Creates Page content sections through forms Row 1: Column 1 - Content A ...
Jeremy Thomas's user avatar
0 votes
0 answers
12 views

Code output help please! WordPress> ACF > Relationship > Post Object

I am using ACF Relationship > Post Object on a custom post-type "family" to select another of the same post-type. My example usage is each post using this custom post-type = a person, the ...
Mike's user avatar
  • 1
0 votes
0 answers
31 views

Plugin question, How to insert a colon in a value box

I would like to be able to insert a colon into my number box. In this case, I would like to put a colon between 15 and 1 instead of the decimal, since it is describing a ratio, but when I do this it ...
zshutoski's user avatar
0 votes
1 answer
35 views

How to get posts in backbone where a custom field matches a value?

How can I retrieve posts, using backbone, that match a particular custom field value? My custom fields are created through ACF. Something like this doesn't work: var data = { offset: 0, ...
MastaBaba's user avatar
  • 281
1 vote
1 answer
47 views

Randomize post list with some posts with specific ACF value in the top 50%

I'm using a plugin that lets me order posts and set some as "sticky" and always on top. I have the example code below that will randomize all posts except for the sticky posts, they will ...
dagnabbit's user avatar
0 votes
1 answer
96 views

Create WhatsApp URL dynamically using ACF Pro from different fields

WhatsApp has a feature that allows you to start a conversation from a link. This link will be built like this: https://wa.me/1XXXXXXXXXX?text=message%20here Where 1XXXXXXXXXX must be replaced by the ...
Wiliam Jose Koester's user avatar
1 vote
1 answer
181 views

Replace multiple RichText components in a single block - wp.blockEditor.RichText multiline prop is deprecated

so a week or so ago my hosting provider updated my version of Wordpress (I cannot control this) and on the edit side most of my Gutenberg blocks are broken. I knew this day would come but I was ...
Mike Sav's user avatar
  • 127
0 votes
0 answers
35 views

ACF Pro simple Business Directory - Requesting assistance with created Templates and associated Functions.php Coding

I want to replicate the basic Business Directory functionality found at this URL. We've not had any luck with off-the-shelf software and our needs are very basic. https://onetopanga.com/directory This ...
Micah K's user avatar
  • 15
0 votes
1 answer
97 views

Is there a way to add a ACF/metadata field data to a custom post type permalink?

I am confused around how the add_rewrite_rule function works, especially with custom post types. I have a custom post type books and for each post, I have a ACF field that is called ISBN. Right now, ...
zeropsi's user avatar
  • 101
0 votes
1 answer
110 views

get_field for a widget value returns null ACF

I am using `ACF` plugin to add a custom field to my widgets. After creating the field with the name `mobile_enable`, tried to get the value with the method explained in the ACF docs which is the ...
MeMo's user avatar
  • 71
0 votes
0 answers
23 views

Hook to Use Second Field Before Fallback

I'll provide background below, but the TLDR is that I can't find the right field/function to insert the post title at the <need_something_here> in the code below. if ( ! function_exists( '...
CWeinhofer's user avatar
0 votes
0 answers
121 views

Copy nested ACF Flexible Content row from one page to another

I have two pages that are location for the same flexible content group. The group consists of a flexible content field that contains a repeater which contains another flexible content. And I want to ...
Horizzons's user avatar
0 votes
0 answers
19 views

WP_Query filtering in ACF field containing dates

I'm trying to use WP_Query to filter Advanced Custom Fields posts that can contain this value in the "dates" field (text type), for example "20230101-20230102;20230201-20230202;20230301-...
jakr's user avatar
  • 1
0 votes
0 answers
40 views

How can I filter records in a custom post type list in the admin based on the ACF field in the post that contains the current user?

I have a custom post type called Projects that includes an ACF field named team_members which uses User as a field type and returns a User Array. I want to filter the post type listing so that the ...
Rizal Kholif's user avatar
1 vote
0 answers
32 views

How do I add a filter to my custom post type archive page?

I used the guide HERE from acf themselves, but for some reason whenever I attempt to query anything at all in the url I get the "There has been a critical error on this website" error. $...
judahking's user avatar
0 votes
1 answer
45 views

Cannot get user's ACF data when using a template part in a WP_User_Query

I'm using a template part to repeat the HTML for each result when performing a WP_User_Query to return a list of users. However I am finding that the Advanced Custom Fields data isn't returning. // ...
greatsplott's user avatar
1 vote
0 answers
141 views

Add ACF fields to Repeater items when using REST API

I am currently building a Headless site using WordPress as a CMS, coupled with Nuxt 3, bridged with the REST API. So far, everything’s been great, but I’m struggling with how to retrieve the ACF ...
Alex Ryans's user avatar
0 votes
0 answers
32 views

ACF true/false field in a custom dashboard widget?

I have a true/false ACF field a setting on my site. I was thinking that instead of burying it in an options page I could create a dashboard widget so it can be toggled on and off right from the main ...
user13286's user avatar
  • 255
0 votes
0 answers
12 views

Adding a custom field of code to a squeeze page

I'm trying to add a custom field to a squeeze page side bar. I have added a widget containing code for default pages so that a certain form appears on those pages in the side bar. I've been trying to ...
Ivor's user avatar
  • 1
1 vote
0 answers
192 views

How to add new ACF repeater row after removing all rows using jQuery/Javascript

I am creating a custom ACF Field within a page edit screen which I have added a div container, outside the container is 3 buttons. Add text block, add image and save. I also have a repeater field (I ...
DigitalDesigner's user avatar
0 votes
0 answers
37 views

Array_splice index problem in ACF Flexible Content

I want to insert a row layout from an ACF Flexible Content field in one page (templates page) into the Flexible Content that is assigned to another page (Original). The Flexible Content field group is ...
Horizzons's user avatar
0 votes
0 answers
278 views

warning: trying to access array offset on value of type bool ACF field image group

I have a problem with an acf function for displaying an image by array. I can get my image to work well when I upload it to the field associated with it. On the other hand, when I don't put an image, ...
Thica's user avatar
  • 17
0 votes
0 answers
60 views

Add "reviewedby" in Wordpress posts

​Hello, I was wondering if there is a way to add "reviewedby" + name (potentially with a blue checkmark) under the author as displayed in the attached example. ​Also, I would like users to ...
User3591's user avatar
0 votes
0 answers
105 views

Phone number custom field and woocommerce updating issue noticed

I use Wordpress user frontend plugin to allow guests to post their woocommerce product on my website but I have observed some issues. Firstly, I added a phone number field in the form, then also added ...
Titus's user avatar
  • 1
0 votes
1 answer
80 views

How to capture number input from wordpress form into acf field in woocommerce

WUFP Phone fieldI am trying to capture the phone number of guests that submit a form on my woocommerce website using the advancedwoocommerce custom field for phone no custom field plugin. I noticed ...
Titus's user avatar
  • 1
0 votes
2 answers
44 views

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field. I have an ACF User field (allowed_users)that author's can multiple select when they ...
Pete's user avatar
  • 998
2 votes
1 answer
1k views

Advanced Custom Fields Custom Post Types Heirarchy

I am seeking some help with Custom Post Types using Advanced Custom Fields Pro. I have created a Custom Post Type (headphones) and enabled "Hierarchical" as explained here: https://www....
Bec's user avatar
  • 23
0 votes
1 answer
59 views

Wordpress custom post type -> query and sort by custom field with multiple values, then published date

I have a custom post type with 2 custom fields that I am trying to sort by: The first custom field is "featured post" (yes or no values). The second custom field is "CPT images ...
Mitch S's user avatar
  • 27
0 votes
0 answers
42 views

add class to woocommerce single product template gallery thumbnails if media attachment ACF field toggled (true/false)

i have the following custom field (quick_ship): i've added this in functions but not working at the moment: <?php $image = get_field('quick_ship'); $size = 'full'; // (thumbnail, medium, ...
vulgarbulgar's user avatar
0 votes
0 answers
23 views

Include custom post type that matches taxonomy field in another custom post type

I have two custom post types, one is “maker” and the other “product”. (used ACF plugin) I have a taxonomy field for Business Name, this field is called “choose_business” in the product custom post ...
Nik Nak Sim's user avatar
0 votes
1 answer
28 views

Wordpress duplicating posts from single loop

I've created a custom post type with ACF custom fields included. The CPT is being placed inside of a bootstrap slider. Everything seems to be working, except, the posts being rendered on the page are ...
Mitch S's user avatar
  • 27
0 votes
0 answers
45 views

Use Custom Field to Display Post Loop

In my custom template I have created a menu which is a row of 10 horizontal tabs. Each tab shows a date which is defined using an ACF datepicker field in the post. I have also created a custom post ...
SavPhill's user avatar
  • 118

1
2 3 4 5
31