Questions tagged [advanced-custom-fields]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
761 views

How to get custom fields in a post when published

add_action( 'publish_post', 'sm12_publish_post' ); add_action( 'save_post', 'sm12_publish_post', 20 ); //After save meta value function sm12_publish_post( $postid ){ /** some checks */...
0
votes
0answers
10 views

Changing site identity logo with ACF options fields

I'm building an options page with ACF and I want the user to be able to update Site info via that menu. I'm able to update blogname and blogdescription with below method, but I don't really even know ...
0
votes
1answer
7 views

Populate select list with meta values from all posts of a Custom Post Type

I've got a CPT of Inventory and I'm trying to show a dropdown of all Mfrs. I've got the form and pre_get_posts function so that when a user selects a Mfr, the page refreshes and shows only the ...
0
votes
0answers
11 views

Yoast Schema Person ID and ACF issue [closed]

I am making a function that change the author of a post with a User custom field from ACF and I need the the Schema ID to change as well. add_filter( 'wpseo_schema_person', 'example_change_person' ); ...
0
votes
0answers
7 views

Filter taxonomy terms by custom ACF field in admin area

How do I add a custom filter to a taxonomy in the admin view (/edit-tags.php), and how do I use a ACF field as what to filter by? I know that you can add a filter to the post list view with the hook/...
0
votes
0answers
8 views

ACF in post are not initiated after wp_inser_post but only after POST UPDATE in admin

I am creating a post with wp_inser_post. Each post starts with a serie of EMPTY ACF fields which should be displayed in any case but the ACF set is not displayed.. any hint on how to do this?
0
votes
0answers
15 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
1answer
21 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 ...
3
votes
1answer
1k views

wordpress REST-API upload image to ACF

I created my own API using Wordpress Rest-API. I successfully saved all data in wordpress backend but I don't know how to get and save the data if file/image. register_rest_route( 'mlcs/v1', '/...
0
votes
3answers
922 views

WooCommerce Custom Tab with ACF Repeater Field

I am using a Repeater of Advance custom field for the content of the my additional custom WooCommerce Tab. The repeater is inside a group field. I manage to display the custom fields that is outside ...
0
votes
1answer
12 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
10 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
1answer
1k views

How to get ACF value inside Gutenberg Block from another page or template? I'm using Timber too

I'm trying to display on my WORK page a value of a ACF field that lives inside a block in a custom post type project. If I get all posts using Timber function like this: $posts = Timber::get_posts('...
4
votes
3answers
41k views

How to display product price of the product in loop

My general question is: how to display product price in woocommerce of a product in a loop, not the price of the product which page it is? In other words I would like to display few related products ...
3
votes
1answer
649 views

Revolution Slider Orderby Two Custom Fields

I have create Revolution Slider which load the custom post type, Events. There are two custom fields, Event Start Date and Event End Date. I would like to display order by Start and End date. Because ...
0
votes
1answer
834 views

Wordpress and Advanced Custom Fields and Flickity

I am trying to add [Flickity Carousel][1] into my Wordpress theme. I was successful yesterday. However, when I returned to my theme this morning the carousel files are not loading. I am not sure what ...
1
vote
1answer
656 views

Using an ACF field from a page within a post loop?

I have a page set up with custom fields using Advanced Custom Fields. One of the fields is a text field for specifying the text for a read more button. Within the page template I have a post query to ...
3
votes
1answer
2k views

How to set custom post type as post title to avoid 'Auto Draft'

I am using a mixture of Advanced custom fields plugin and Custom post type UI to give my users some extra functionality. The problem I have is that I have serup a testimonials menu and in the list ...
1
vote
1answer
886 views

How to populate a parent page with its child subpages and associated templates

I have a decent understanding of Wordpress as well as the Advanced Custom Fields Plugin and I'm trying to write my parent page template right now, but I'm having trouble trying to figure out how I can ...
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
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
0answers
15 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
2answers
541 views

Automatically convert standard posts with custom fields to custom post types

I am just beginning a page, and for my current purposes it seems that the only extra things I need are a couple of extra fields for posts of a certain category. Because I only need to add a little ...
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
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
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
9 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
1answer
563 views

ACF page while loop breaks footer while loop

So basically i have a main page and a footer page. Both are seperate .php files. Im using ACF for this site. Following the documentation, ive created a while loop for my 'flexible content' in the ...
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
1answer
599 views

Migrated from localhost to server and cannot get custom_fields content anymore

So i migrated from localhost to my server, everything is working but my plugin cannot get the custom fields data anymore. I get my custom fields this way: $customs = get_post_custom($nodeid); $...
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
3answers
13k views

Download PDF after CF7 form submission

I'm working on a client's build, and I'd like to change as little as possible. I'm not too familiar with all this, my apologies - I'll try to show where I'm at. The client wants a form submission to ...
1
vote
1answer
639 views

Lock user information once fields have been filled in

Much like the username is locked down and cannot be changed once it has been registered, I would like to lock down additional fields I have created with Advanced Custom Fields like the person's ...
0
votes
1answer
1k views

How to use ACF with javascript to update custom field values?

I want to track the number of button clicks in my coupon website. The button values are retrieved from custom fields created using the ACF plugin. I have a custom field total_clicks. Every time when ...
0
votes
1answer
430 views

ACF - Get file size

I'm using Advanced Custom Fields to display some uploaded items on the website, but I also need to display the size of the files. I have this code: $filevalue = get_field('file_bestand'); $filesize =...
0
votes
1answer
684 views

Use output of wp_dropdown_categories($args)

Please be gentle, I'm new to all this coding! I have finally worked out how to get a frontend dropdown field allowing me to select from EDD categories (I got this from the Codex): <div class="...
0
votes
1answer
972 views

Let Users Filter Posts by Custom Fields

I'm using the Advanced Custom Fields plugin to add custom fields to my posts, but was wondering what is the best way to go about creating a filter box for the user to filter through posts. I've been ...
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 ...
1
vote
1answer
733 views

Display PHP within HTML values

What is the correct way to display a value in a link using php? The (Advanced Custom Fields) php works correctly outside of the html. Book on Expedia.com <a class="alignright" href="<?php ...
0
votes
1answer
895 views

Query string order by custom field

I have code for custom post type, for custom taxonomy for displaying category posts. I am using Advanced Custom Fields What I want is to order posts by custom field value, and I was wondering how I ...
0
votes
0answers
17 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 ...
2
votes
1answer
938 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 ...
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 ...
1
vote
2answers
962 views

change value of fields created with advanced custom fields in the front

I created a field to enter whatsapp number in the front of a site in wordpress, since the back is simple, but I need to change it from the front section for the users I have already placed an input ...
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
17 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
17 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
1answer
45 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 ...

1
2 3 4 5
27