A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [advanced-custom-fields]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

ACF - Adding PHP into Slick Slider Breaks the Slider

I have built a slider using Slick and now when I add a ACF options value into the slider it breaks. Any Ideas why? Just repeated the element for testing reasons. Anyone had something similar? So ...
0
votes
0answers
16 views

Modification of RSS feed is not consistent

I am using the following code in my child theme's functions.php file to replace the_author() value (dc:creator node) with the value of an Advanced Custom Fields text field named custom_byline. It ...
0
votes
0answers
8 views

Customizing the oEmbed field to loop and disable up next queue for dailymotion video

Hey I am using cpt and ACF. I have an oEmbed field in which I want to loop video and disable relate video (up next queue for dailymotion )for which I have this code ---- `?php the_field('video_embedd')...
0
votes
1answer
16 views

ACF repeater field with meta_query

How can I use a repeater field with meta_query I have a repeater field with some text values only and have a form that sends variables to a page where I get the value and storage a value which is the ...
1
vote
1answer
19 views

Post edit - Media Library - Only get images from current post

I've got a few ACF Image fields for posts And I want to only query the images in the media library browser already uploaded and used on the current post. In other words, when opening the media library ...
0
votes
1answer
21 views

Advanced Custom Forms PHP formatting for do_shortcode

Hi i am trying to build a simple wordpress template template and want to introduce a pdf viewer into the page that pull's it file from an ACF field I am pulling my hair out with the syntax on the ...
1
vote
0answers
23 views

Custom Fields with Pods not being translated

The icon for translation for custom fields using Pods.io Plugin aren't working after installing WPGlobus Plugin and Pods Plugin, do I have to install the premium version of WPGlobus? I see when using ...
-3
votes
1answer
14 views

Synch ACF with WooCommerce Billing Fields on First Login [closed]

my registration form is made with WPForms. My Problem is: Because WPForms is not integrated with WooCommerce, I only may store the billing information with ACF (Advanced Custom Fields) during the ...
0
votes
1answer
43 views

disable (read only) a field if within a custom post type name

I have two bidirectional fields 'album_band' in two different custom post types 'album' and 'band'. This field allow multiple selection and is mandatory in 'album' I've been trying to disable or set ...
1
vote
1answer
37 views

How to decrease the number of queries with get_posts and ACF?

In my index.php file, inside the classic WordPress loop, I had to query posts in order to retrieve the ones with a relationship value created with a custom field (managed with ACF plugin). I managed ...
0
votes
0answers
10 views

Filtering get_terms loop by custom fields & custom taxonomy

On specific page I’m displaying posts from my CPT („opencourses”). Posts from this specific CPT are grouped by custom taxonomy („kategoria”) - this piece of code works. At the same page I have four ...
0
votes
0answers
14 views

Wordpress Pill is not working

Contents (images) I used to upload using Advance Custom field or any content (text or anything) is not displaying under the categories. This is my code. page-gallery.php <?php get_header(); ?&...
0
votes
0answers
17 views

ACF post object relationship display odd even

I want to display an ABBAABBA of chosen posts created with ACF. But my loop displays the posts twice when i use the following: for ($i = 1; $i <= 2; $i++) { ...
0
votes
0answers
24 views

How to use ACF and CPT to create a shortcode for conditional objects

I am trying to create a shortcode called [brand_collection] with the attributes brand and collection. The shortcode with create a table from a custom post type with ACF on it. here is my ACF setup [ ...
0
votes
2answers
23 views

How to call ACF field in functions?

I'm working on a website and am trying to fix how they set up their meta tags, but am having a bit of trouble. The current way its set up is that all pages have the og:image set to a logo. I want two ...
0
votes
0answers
13 views

Is there a way to pre-populate an ACF Form with existing data when creating user meta data on the front end? [closed]

I have a field group that I created, which I am using to create a form on the front end of my site so a user can update meta data tied to their own profile. I am using this function to print the form,...
0
votes
1answer
20 views

Accessing values from ACF sub field (flexible content area) in PHP

I'm trying to access the values of a ACF sub field using PHP. $articles = get_posts( array( 'posts_per_page' => -1, 'post_status' => 'publish', 'post_type' => array('venues', '...
0
votes
0answers
8 views

Query BETWEEN timestamps (today and in a custom field)

I am using wordpress 5.3.2 and advanced custom fields pro Version 5.8.7. My custom field is called timestamp. See below my ACF configuration: I tried to query the db like the following: ...
0
votes
0answers
14 views

How can I get a variable value from ACF in header.php? [closed]

i create post type and store some data with Advanced custom field in that, now i wanna retrieve data in header.php file. i can retrieve data in my post type but i can't use data in header for example ...
0
votes
0answers
15 views

Can selected taxonomies be used dynamically to display information?

I’m creating a business directory site in which users will create a business listing and while creating that listing, select certain amenities they offer. I’ve created several taxonomies to be used ...
0
votes
1answer
23 views

How to access repeater field of a custom field?

I have a custom post type called donation_group it has a custom_field called donate_pages which is a repeater field. This donate_pages has again fields called donation_object and amount_received. I ...
0
votes
1answer
29 views

Possible to edit custom date field and display?

I would like my site to show the x time ago on posts but we also have lots of events listed that are effected by the sitewide change and are also showing x time ago dates too even if they are in the ...
0
votes
0answers
24 views

Get field value and use as variable in php

I have code below. Product field "position" has a value of 52 on 50% of the products. The other 50% have value 100. I want to set a value in the code below to be this variable. At the end of the code ...
0
votes
0answers
23 views

Place product field value as variable in php

I have created a new field using ACF for woocommerce. The field is called "position" and has default value 52. Now I want this value as a php variable in a image generation script. Inside one ...
0
votes
1answer
19 views

Creating an image from a custom field

I'm working on the theme creation in WordPress. When I try to customize hero image(using advance custom plugin) in my theme it doesn't appears and i gave image path in css file. Here some code of ...
0
votes
0answers
10 views

echo a list of meta-keys used in specific Custom Field post type

I have a few different post types, and i need to create a filter list for each one. Ideally this would use the 'meta_key' => 'departing_from' created by the customer, So it would only show the ...
0
votes
0answers
31 views

Filter posts by their related field's custom field

I have two post types named 'programs' and 'universities', where the programs are connected to their respective universities. I want to filter programs by university's custom fields such as ranking ...
0
votes
0answers
20 views

acf/save_post not getting saved acf values on initial post save

Strange problem here. I'm running exactly same code on local dev and on my server. So I am trying update some of the post object with ACF field data from my post when the user initially saves a post. ...
0
votes
2answers
98 views

How to get current post ID in Contact Form 7 wpcf7_before_send_mail hook action

I'm trying to handle the CF7 data before send and update the current post custom field using ACF function but I'm unable to get the current post ID the form is send from. I've also tried getting the ...
0
votes
3answers
63 views

Display all custom meta field values from the database using ACF Repeater

I'm working on a personal project which includes multiple custom fields (created via ACF). A few of them are repeater types. I want to to display 3 arrays/blocks of those repeater subfield values. ...
1
vote
1answer
14 views

Post Object field orderby (Advanced Custom Field)

I created a Post Object field type (see attached screenshot post-object-0.png) How do I output the instructors in order by the selection choices made by the users (see attached screenshot post-object....
1
vote
1answer
18 views

Output comma with get_field in Advanced Custom Fields [closed]

I would like to output the name and the degree in this format: John Doe, PhD My code is as follows: $degree = get_field( 'degree', $post->ID ); <h4 class="block-slider-...
1
vote
1answer
24 views

How to make Advanced Forms (and/or ACF) encode input value?

What I have WordPress site with ACF Pro and Advanced Forms addon. I have created a form to help my users unsubscribe from the newsletter. User inputs his/her email and submits the form (ie. email@...
1
vote
1answer
41 views

Output ACF repeater on frontend user's profile page (created with Ultimate Member) [closed]

I'm using Ultimate Member plugin to manage my user directory. I also use Advanced Custom Fields to create some custom fields on the backend of the user's profile page (location: user form > equal > ...
0
votes
0answers
13 views

how to link subdomain backend to main backend?

when you have to create m.domain.com subdomain for mobile devices,do you usally re crate backend (such as C.P.T posts combined with A.C.F ) or there is way to link subdomain backend to your main ...
1
vote
0answers
10 views

is there a way to link one of the field in ACF field group, to a field in a media attachment page? [closed]

so i created a post type that will allow user to enter Basic Information such as patient id and full name. and since they're allowed to upload pictures in the media page, i would like the user to be ...
0
votes
0answers
19 views

How to display a table based on data from a custom content type with custom fields

I have created a new content type called "casinos" with the following custom fields: Bonus Offer Rating Score Aff Link Casino logo I created 10 posts of "casino" type which contains information ...
1
vote
1answer
10 views

Order RSS content by an advanced custom field value

I have created a custom post-type called "event". For this custom post-type I created an advanced custom field called "event_date". Now I am trying to display the list of my events in a RSS feed. ...
1
vote
0answers
13 views

Troubles with acf/save_post and WP_Query

I made an accounting system with ACF and CPT, but my client wants to be able to see the balances of each account from the post table in a column and not entering the single of each account. My ...
1
vote
0answers
19 views

Add new image block, set default class name and update it using Javascript

I am trying to programmatically set a default class on an image block, which is applied without the user manually adding it via the 'Additional CSS' field. I have tried applying a default style on ...
0
votes
2answers
13 views

If statement shortcode

So, I am creating a shortcode to return some ACF content. The following code works: function howitworks() { $page = get_page_by_title('shop'); if (have_rows('steps', $page->ID)) : ...
0
votes
0answers
15 views

Content page for each taxonomy of custom post type as child page

I have a custom post type which I wish to follow the URL structure of: /[post type]/[post name]/[taxonomy name]/ I wish for both this page and the regular CPT URL (/[post type]/[post name]/) to have ...
0
votes
0answers
19 views

ACF Gallery field images donwload

I have the following image gallery in ACF: $slider = get_field( 'slider' ); I need to create a function so that with a single click, the entire image gallery is turned over to a .zip file. Anyone ...
0
votes
0answers
34 views

Loading ACF Field content on a 404.php page

I am trying to load a ACF Field from a page to my 404.php but i cannot get it to work. get_post_field works fine but get_field does not <?php /** * The template for displaying 404 pages (not ...
0
votes
1answer
13 views

If ACF Post Object post has custom taxonomy term…

I’m trying to conditionally display a div if a post object post has a specific custom taxonomy term. The custom taxonomy is called ‘room_vacancy’ and the term is called ‘booked’ I’m using the ...
0
votes
0answers
23 views

Sort posts of a particular category based on custom date field value, and display in ascending order

I'm working on displaying a listing of posts that have a an advanced custom field Date Picker, and I need to display all upcoming posts in ascending order. So far I can get the wp_query to show all ...
0
votes
1answer
49 views

ACF save json to custom directory not working, default acf-json used instead

I am using Advance Custom Fields local json so I can synchronise my forms across different environments. See my function below, with var dump outputs in comments so you can see what is going on... ...
0
votes
0answers
55 views

Display Advanced Custom Fields value in Woocommerce admin order details

I created an custom field with the ACF plugin to add additional information on the Woocommerce product edit page. It's a subtitle to the product name (all variable products). I was able to make the ...
1
vote
1answer
15 views

Query custom post type with ACF Date

I am using PHP 7.3.5 and wordpress 5.2.x. I have the following custom post type: register_post_type('Calendar-Events', array( 'supports' => array('title', 'editor', 'thumbnail', 'custom-...
0
votes
1answer
49 views

ACF Flexible Content with Bootstrap Carousel Repeater

I'm trying to add a counter for each instance of this flexible content carousel built with Bootstrap. I've tried multiple ways of counting with the while statement. What would be the correct way to ...