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
1answer
18 views

Custome fields not displayed

I am unable to see the custom fields I have added in the website. I have done the following: I have installed Custom Post Type and Advanced Custom Fields plugins. Using them I created a custom post ...
0
votes
1answer
10 views

Expire post to draft by date-picker custom field

Need to set post to draft when it reaches date from ACF date-picker field. This is code I'm using: // expire offer posts on date field. if (!wp_next_scheduled('expire_posts')){ wp_schedule_event(...
0
votes
0answers
13 views

How to set h1, h2 etc tags on ACF Pro fields in Visual Composer? [closed]

Using Advanced Custom Fields PRO in Visual Composer. How do I set h tags on an ACF custom field with type 'text' so the field displayed in visual composer is wrapped in <h2> tags? Note: The fact ...
0
votes
0answers
6 views

how to display value of acf field from selected elementor control

I have created elementor SELECT control that shows all post from 'post_type' => 'digital_card' now I want to display the ACF field from the selected post my ACF field name is business_name $...
0
votes
0answers
8 views

Post content synchronization for two languages

I need to make website work in 2 languages. I am interested if I can set automatic duplication of posts content across the languages once post is published in one language (including ACF radio buttons ...
0
votes
1answer
18 views

Filter works on last selection but no others

I have been working on a frontend filter using ACF Custom Fields. I can filter by the last selection states. but can't select any other option. Below is my code any help would be greatly appreciated. ...
0
votes
0answers
6 views

How to query results for post_title and Custom Post Type/ACF field pivot query

I have a custom query that needs to match a search term to a custom post type of event by post title and by an ACF field host and then filters out events that have passed the current date to a REST ...
0
votes
0answers
14 views

Advanced Custom Fields “Flexible Content” to not echo header if layout is unused

My website allows front-end users to create posts, they can add quotes, highlights and sources for their content. I am using Advanced Custom Fields "Flexible Content" for the user to add as ...
0
votes
1answer
17 views

WP get_posts meta_query using ACF repeater field

I have a Custom Post Type of 'ITEM' that allows the admin to add an 'Item Number' using an ACF text field. In another Custom Post Type of 'GROUP' the admin can use an ACF Repeater to enter multiple '...
0
votes
0answers
24 views

meta_query not behaving well with spaces

I have created a custom search page where i can search in a Custom Post Type (Products) based on a number of custom fields that each product post has. This is the search input: <form role="...
0
votes
0answers
8 views

Get ACF Taxonomy select values to update based on previous field selection

I have three Taxonomy fields on my page ('Sector', 'Subsector' and 'Key Role'). The Taxonomy itself is called 'Job Category', and 'Subsector' and 'Key Role' are both children of 'Sector'. So for ...
0
votes
0answers
15 views

Show content between ACF fields for start and end time

I've been trying to work out how to implement an acf timepicker field into my php. The idea is, if the current time falls between my selected start and end times then a certain piece of content will ...
0
votes
0answers
14 views

Setting Advanced Custom Field ACF Predefined Value

I want to set predefined field and value for ACF with repeater from child theme. So I want to create field like in the picture below, and all the data I'll import from csv, only the active they can ...
0
votes
0answers
19 views

Wordpress URL rewrites using Advanced Custom Field

I've been working on this for a couple of days now. There have been many similar solutions here on this site, but none of them have worked out for me, or they nearly do, but then something else breaks....
0
votes
0answers
8 views

How do I set/save a custom taxonomy term selected in a custom field (select element) to the post?

I'm a bit out of my element and feeling very stuck on something that seems like it's really obvious. Basically, my question boils down to me not being able to "save" custom taxonomy terms ...
0
votes
1answer
14 views

How to add a custom field for image in “Text and Full Image(text right)” layout?

I need add another image in the standard "Text and Full Image(text right) layout" in WordPress. This layout by default has a field for an image. I located the php file that renders this ...
0
votes
0answers
16 views

Dynamically Set Default select value from CPT in ACF form via ACF Post Object

I have an ACF form on my site which let's user create their own size which is stored as CPT, if user is logged in I want to show him list of saved sizes, and I want form to load select field default ...
0
votes
1answer
34 views

Custom sort comments with select form

I use ACF Pro to create a customized comments section with additional fields to my custom post type called Products (it's a simple page with a custom comment section, NOT using WooCommerce). Now ...
0
votes
1answer
25 views

Custom Post Type and Structure Question

I'm working on a site with a structure I haven't seen in the past. Specifically, the site has Inventory Items (custom post type 'item') that show on Item Archive and Item Single pages. For some of ...
1
vote
1answer
16 views

Update posts after populating ACF field value

I'm running a function to populate some custom fields with some values specified: add_filter('acf/load_field/name=event_end_time', function($endField) { $endDate = get_field('event_end_date'); ...
0
votes
0answers
16 views

ACF group field disappeared after deployment using deployer script

When I deployed a code from local to staging server after ACF Fields are disappeared in the pages, I am using a deployer script to deploy a code from the local environment to a staging environment ...
0
votes
0answers
13 views

Adding inline style to CPT admin backend

Let's say I have a custom post type that looks like this in my backend: How can I add some HTML inline style to the status column based on the content itself? For example, when the status content is ...
0
votes
1answer
39 views

JSON - Create rest api endpoint for Advanced Custom Fields

I using plugin advanced custom fields to show recommended posts in my sidebar (posts that authors select as recommended using radio buttons (yes or no)). And it is all working well. Now, i will need ...
0
votes
1answer
31 views

Display a Custom Post Type with Advanced Custom Fields on Homepage

I'm pretty new to WordPress coding. I currently use Themler for my WordPress theme which allows you to put a CMS Code container right into the page and display any WordPress code. I am using the &...
0
votes
1answer
14 views

Trying to add ACF to authors meta and adding a class at the same time

I am trying to add a an acf field called "name" while also adding a css-class to it the_field('name') to this code if ($go_magazine_options['post_meta_author'] === 'enable' && ...
1
vote
0answers
11 views

Link theme options page using ACF to styles

Forgive me, I'm very much a beginner. I'm looking into custom theme development and creating a theme options page. Using the options page, I want to set a primary color that will be used across all ...
0
votes
0answers
11 views

Build a custom search date filter based on date ranges in ACF text field

I have cars not available during range of periods. These periods are on one ACF text fields (in json) named date_not_available like this : [ {"from":"22/03/2021","to":&...
0
votes
0answers
13 views

ACF update_field is not getting saved after wp_insert_post

I have the following loop where I insert new custom post types in db and after I try directly to add some ACF field values which they are never getting saved. What is wrong in this case with the code ...
0
votes
1answer
44 views

Form checkbox value going to dynamic URL

Well, I have a Database made mostly with 'Advanced Custom Fields' in a page on my site that is supposed to get all the STORES (custom post type) of a city and show them to me, and by changing ...
0
votes
2answers
32 views

CPT email notification including only new value custom fields

I have a custom post type «teams» with a set of different custom fields (ACF). I'm not a big coder, but hope to get some guidance in how to create a function that sends an email including ACF every ...
0
votes
1answer
36 views

Shortcode for Custom Field of Media Attachment (to use with Featured Images)

I'm using ACF (Advance Custom Fields) for Media Uploads to store location information about photos. When I set a post Featured Image to a photo that has this extra field, I'd like to output the ...
0
votes
0answers
41 views

How to work with posts and sub posts?

I am working on a site for a film-festival-archive. I need some kind of a post and sub-post structure. Like: 2018 Main festival post -- directors -- locations -- press material Each sub post has its ...
2
votes
1answer
36 views

How does wordpress blocks?

Couldnt find an answer on this one so thought id ask here. So you have pages which are a post type, On each page you have the post_content which in my case - Is just a bunch of other blocks, Eg in SQL ...
0
votes
1answer
25 views

ACF checkbox return format based on page

I am using advanced custom fields checkbox and have it set to return format "both label & value". I would like to display checkbox value on the frontend except if the page is woocommerce ...
0
votes
0answers
11 views

Bulk Update Custom Fields for Custom Post Types

I am using this function which works great in case anyone wants to bulk update custom fields for custom post types (just change parameters as necessary). $args=array( 'posts_per_page' => -1, '...
0
votes
0answers
14 views

How to display ACF values from a post to the category template

I would like some help creating a category page that will display all the posts of the category and display the custom field value (product_indications) in every post in the grid. I am new to ACF ...
0
votes
2answers
19 views

How to display acf field values from home page on all pages?

My home page uses ACF ("settings home") fields. These fields position the items in the footer. The problem is that they don't display on other sites. How to display fields from the home page ...
1
vote
1answer
21 views

Multiple ACF Repeaters within a Custom Post Type

I am trying to create a single post template for the custom post type Garden Tips (single-garden-tip.php) The url to this page is: http://evergreenhorticulture-co-uk.stackstaging.com/garden-tip/...
0
votes
1answer
42 views

ACF multi taxonomy on filterable gallery

I created a filterable gallery with ACF. My problem is that when I add a project to which I add several taxonomies, in my gallery I have the project as many times as I have added taxonomies. Apart ...
0
votes
0answers
26 views

ACF Taxonomy field values not select in backend

I created delivery type field using ACF taxonomy. And its working finecheck but I need to add this field in my website product add page. I used some hardcode in my theme funtion.php to show the ...
0
votes
1answer
12 views

Fill up advanced custom field of a custom post type via API REST POST

I have few custom fields created by ACF on a custom post type "room". I use postman and the REST API to try to create a new room with my custom fields. The Autorization is ok. I success to ...
0
votes
0answers
20 views

Get ACF Sub-Category image from loop

I'm using ACF to assign a category image to sub categories. Parent category-(contributors) > Sub categories-(contributor name). All my posts have multiple category and sub categories selected but I'...
1
vote
2answers
27 views

If two first numbers exist in wp_meta_query value

I want to display a Custom post Type "Companies" filtered by zipcode. In my CPT I have an ACF field called 'companies_zip_code', their values looks like this : 29200 29860 35000 22350 ... I ...
1
vote
1answer
19 views

How to display genre of music content from one page to another page in wordpress

I am building a WordPress website and on the homepage is a category of music genres. The site is created so that can listen to music beat of different genre then go ahead to buy the beat. I have ...
0
votes
1answer
33 views

Ajax call undefined index

I am trying to get the content of an ACF field through an Ajax call. This is my callback function: function my_ajax_request() { $id = $_POST['id']; if( have_rows('carousel_slide') ): ...
0
votes
1answer
19 views

Two problems that are likely related to AJAX

Guys. I started a new WP website about a month ago. Recently, I ran into two problems that I suspect have something to do with AJAX but I'm not sure. The first problem is the Media Library showing no ...
1
vote
1answer
35 views

ACF Custom validation message not showing up

I have two date fields where I want to make sure the "end date" is always later than the "start date". I added a validation function per ACF's documentation. It does fire, but the ...
1
vote
0answers
17 views

How do I correctly set up a WP-Query to only show upcoming event-posts?

The goal is to display event-posts only for upcoming events. Setup is Elementor Pro combined with Astra Pro theme. I added a custom date field called 'eventdatum' (d/m/Y) to posts and via the ...
1
vote
0answers
10 views

Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?

TLDR - After manually updating a custom post, my WP_Query will change it's sorting order and move that updated post to the end of the array response. I have a custom post type called Events that use ...
1
vote
0answers
7 views

How to schedule a custom field value update?

I have created a boolean checkbox custom field using ACF to mark a post as "featured", so it shows up on the homepage slider. I'm trying to figure out how to set up a timer so these posts ...

1
2 3 4 5
27