Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
0answers
6 views

WebP Fallback for Inline Background Image in Style Attribute

I have developed a theme which has a custom post type called projects. On single project pages there is a parallax style section with a high quality scrolling background image. I am using a custom ...
0
votes
0answers
12 views

Advanced Custom Field not present in post object

I noticed that while looping over a post, the_field('item_title) is returning empty. I'm debugging the post object, and I'm not seeing any advanced custom fields. Correct me if i'm wrong but they're ...
-2
votes
1answer
14 views

How do I convert an ACF field from a string to an integer?

The client will be entering information for the year a report was produced (eg. 2010). I want to take that information and calculate if it was made in the last 3 years so I can display it in a 'recent ...
0
votes
0answers
23 views

Where have I gone wrong getting a post-type to show up as relational to another post-type?

I feel this has a simple answer but I assure you I did the due diligence. I feel like I followed documentation to the letter. I have found similar issues but none with a solution to my problem. I am ...
0
votes
1answer
20 views

ACF: Updating gallery field doesn't work in backend

I have tried to update a gallery field and the images shows up in frontend but not the backend. // I have also tried to use the ACF field name like $field = 'field_xxxxxxxxxxxxx'; $field = 'images'; ...
0
votes
0answers
15 views

How to use custom fields to search for the specific posts?

My intention is to build a website with places/attractions (as posts) I would like to visit i the future. Something like “extended” Bucket list. :) I created couple categories, enter couple posts… ...
0
votes
1answer
28 views

Retrive acf fields in publish_post action for wp_mail

I have a custom post type called "Envios". In it I've created a Custom Meta box which allows to select users and posts. When one of this custom post types is published it sends an email to the ...
0
votes
0answers
16 views

CPT Loop filtered for buddypress user ID or ACF user relationship field

I've got the following code displaying a post loop for a CPT "gigs" on a buddypress profile under a custom tab (code not shown). In my buddypress install, I have both employers and employees. The ...
0
votes
0answers
17 views

How can I add an image to Wordpress' image array

I want to apply a filter to an image whenever one is uploaded and add the new image to the original's image array, similar to how multiple image sizes are added to each image array. example Image ...
0
votes
0answers
18 views

ACF Repeater and Sort

In frontend page outputed ACF Repeater content and I need add dropdown in page frontend with name and date, for sorting for ACF Repeater content.
0
votes
1answer
24 views

List events by month

I am working on a WordPress site consisting of a custom post type called "events". Each "event" consists of a custom field called "event date". I'd like to organize all the "events" by months based on ...
0
votes
1answer
53 views

Build table using Advanced Custom Fields

I have a table that populates data pulled from ACF. It basically adds a PDF of a report if there's one available. I think I got that part figured out, but my code is awfully complicated and I'll like ...
0
votes
1answer
20 views

How can I copy an ACF field to AIOSEO field? [closed]

I'm trying to update and modify the accepted answer to this question Copy SEO Meta Desc "Custom Field" to Excerpt field? to use an ACF custom field and different "if" logic. I want to check ...
0
votes
0answers
17 views

How to display dropdown filters for posts

I need to display posts by state and city filter. How can I do this? By plugin? or by programming? Here is an example of the layout
1
vote
1answer
16 views

Unread Repeater field IMG alt not working

I've got a repeater field with images; <?php $produkt = get_field('produkte-startseite'); <div class="row start-products"> <?php foreach ($produkt as $produkte): ?> <a href="&...
1
vote
1answer
21 views

Unable to write multiple values back to ACF user field - PHP

My project is to make an initial match of adoption mentor & mentee users. And then add additional mentees to that mentor. My mentor has an ACF current_mentees (list of users) field. I am able to ...
0
votes
0answers
16 views

How can I dynamically filter the choices in a taxonomy select?

More specifically – I have multi-select taxonomy field A. When one or more values are selected in A, I want to restrict the choices available in taxonomy field B. So for example: Two Taxonomies ...
0
votes
0answers
17 views

How to access ACF fields in Elementor templates?

I am creating a custom archive page for a custom post type, but I need to get some Advanced Custom Fields (ACF) values into it. Is there a way to do that when building a template? For some reason, my ...
0
votes
0answers
23 views

ACF - new flexible content layout not displaying on front-end

I have added a new layout to a flexible content block, but for some reason it isn't displaying on the page as it should. Previous layouts that have been created are displaying fine and the layout I ...
0
votes
0answers
47 views

get_field() with ID in one signal filter not working

I am trying to get_field() using post id in one signal filter, I am getting the value of post id. But for some reason note getting the values of get_field(). I have imported wp-load, but still didn't ...
0
votes
1answer
19 views

How to create “custom page types” with different custom fields in them?

I have lots of pages that perform very different purposes in my website (landing pages, thank you pages, regular website pages, webinar pages, etc). As such, I would like to group my pages into ...
0
votes
0answers
45 views

Custom Post type with ACF in REST API, how do I get those values?

I use http://github.com/jjgrainger/PostTypes/ to register my custom post types and ACF to add custom fields to my custom post and I want to include in my wp-json response all registered fields per ...
0
votes
0answers
19 views

How to load ACF groups With jQuery or Ajax

When i want to edit wordpress page, it is taking 2min to load bcz of custom fields, am loading same type of custom filed 3 times, it will give the option to select the posts, left side we have latest ...
0
votes
0answers
62 views

Taxonomy within repeater with display of an image

guys. I have searched for a way to display an image dynamically within a repeater field assigned from an existing taxonomy for 6 months. I tried related acf fields and did not succeed. If the code I ...
0
votes
0answers
33 views

Passing ACF field value to hidden gravity forms field

We have an Advanced Custom Field Field named web_refrence. We now need to pass the value of this field to a hidden field in Gravity Forms. We have tried the below but it does not seem to work: ...
0
votes
1answer
29 views

ACF: Filter Conditional Logic Sub Fields Based on Parent

I am trying to create a search that filters posts by country and state/region/province. I have created some conditional logic sub fields based on country and now I am trying to figure out how to ...
1
vote
2answers
19 views

Is there a way to work with a specific the_field from an already queried post? [closed]

I'm relatively new to working with wordpress and php in general, so I'd like to know if someone can help me with this. I have a custom query that looks like this <?php $args = ...
1
vote
0answers
29 views

How to create a dropdown select of all items in an ACF field group

I have a series of Field Groups, each attached to a specific product category (woocommerce) and I need to be able to access ALL the data regarding each field group on the product category page. This ...
0
votes
1answer
25 views

Query entries from custom post type in an ACF flexible content field

I want to query a custom post type cpt_locations if the office_locations layout is selected in a flexible content field. I'm sure I have the standard syntax, but if I view the page it prints yes many ...
-2
votes
1answer
73 views

ACF Load Field Groups Programmatically [closed]

I would like to load ACF fields for custom post types based on a set of conditions and NOT use Custom Location Rules. A brief use case / rationale: If CPT A exists AND Theme Option Y is 1, then show ...
0
votes
1answer
22 views

Showing an ACF field in admin posts dashboard

Looking for a way to display a post's ACF data in admin columns using manage_posts_columns hook. In my functions.php I have this: function custom_columns( $columns ) { $columns = array( '...
0
votes
0answers
79 views

List by state -> category -> City

I am trying to get this: Heathcare Salisbury --Medical Office A --Medical Office B Charlotte --Medical Office D --Medical Office C and I am using this code: <div id="sidebar1"> &...
0
votes
3answers
78 views

Displaying user data within ACF relational field (user type)

I'm trying to display user info including custom fields determined by an ACF relational user field, and all contained within a flexible content field. EDIT Updated code following answers / comments, ...
0
votes
2answers
100 views

Show specific posts with WP_Query using ACF Post object

I need help with this one. What I want to do is to display specific posts of the custom post type. Everything working fine, just I can't display more than 1(one) post. doesn't matter how much posts I ...
0
votes
1answer
30 views

Advanced Custom Fields - Get value in other plugin file [closed]

I'm using the ACF plugin and i have a dropdown added to users who have a specific role. The dropdown contains the values Yes and No. That value i need to get in an other plugin, but i couldn't get it ...
0
votes
0answers
45 views

Passing values AJAX Callback With JSON (PHP)

I'm making a search filter with a form showing a few select dropdown values and one true/false input. The dropdown values populating the form are ACF fields for a custom post type ARTWORK. The ...
0
votes
1answer
23 views

Wordpress creates new lines in postmeta table on post update

I noticed some weird behavior in WP. I've created custom fields through ACF Plugin. I've also coded a function that can update posts and custom fields at the same time with wp_post_update and ...
1
vote
0answers
14 views

Bulk-Update Custom Posts

I have the following code in my functions.php file that I'm using to create a custom meta_key called 'spec_wp' (which is based on the value of an ACF repeater): add_filter('acf/save_post', '...
-1
votes
2answers
44 views

ACF + WPML: How to translate date fields?

I'm trying to translate the month name outputted by an ACF date field. How do I get the Spanish versions of those month names? Here's an example of my code: $start_date = get_field('start_date'); $...
2
votes
0answers
66 views

Linking three taxonomies with ACF

I'm creating a product finder using a CPT called "Products", which is already used for displaying products separately on the site. The product finder is based on a answer and question idea, where the ...
1
vote
0answers
19 views

How to remove the inline styles from the content of a WYSIWYG editor field at the time of saving the post?

I am using the WYSIWYG editor as a custom field using ACF plugin to insert a custom table in the field. As a data, the table needed is simply the HTML Markup of it only, only attributes specific to ...
5
votes
4answers
281 views

Front end form to create a custom post with preview

how can i achieve a front end form with preview option to create custom post based on the input? I want it done without any plugin. A simple example will help a lot. This is not a ACF question but ...
-1
votes
2answers
107 views

meta_query for an ACF checkbox field don't works correctly

I got a problem with value = 0 for meta_query checkbox field: $args = [ 'post_type' => 'post', 'post_status' => 'publish', '...
0
votes
1answer
65 views

Use ACF select field to add a class to div inside a flexible content layout [closed]

I have built a simple page builder using ACF Pro flexible content fields. I want the user to be able to choose a background colour for the section using a radio button selector. I have set up the ACF ...
1
vote
1answer
63 views

How to create an array for a CPT post ID to use in an IF/WHILE statement

I am using ACF and I am trying to do the following on a page Create an array of the custom post type "Services" post IDs Check if the array has at least 1 post ID If so, for each post ID, display: &...
0
votes
2answers
85 views

Strip characters, Including spaces, for tel: link

I'm trying to create a proper 'tel:' link for phone numbers that are added in an ACF text field. So I'm just trying to strip extraneous characters, but the spaces are causing a problem. Existing code:...
0
votes
1answer
26 views

Do comparision after updates hooks of acf-fields?

I have this code: public function init() { add_filter('acf/update_value/name=bookitall_fromdate', array($this, 'check_bookingdates' ), 10, 3); add_filter('acf/update_value/name=...
2
votes
2answers
21 views

can't get query to order posts by acf datepicker

I've read alot, I've tried a bunch of different things, I still can't get my query to order posts by acf's datepicker field. This is what my code looks like: $args = array( 'post_type' => '...
1
vote
2answers
46 views

Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes

I have 2 custom post types, project and person. Both have several custom fields. I'm working on a template for the project custom post type. In the project custom fields I have several fields of type ...
1
vote
1answer
28 views

How to filter get_post with ACF by a checkbox field?

So, I have a custom content type called "team" where I have an ACF field attached called "external" which is a checkbox. I am currently getting all the posts by passing the following arguments array ...