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
4 views

using ACF how do validate a date against another date in the same group with a repeater field? [closed]

This would not be an issue if ACF had a date range picker. But it doesn't. I have a group of date ranges using two datepickers (from_date and to_date) I need to ensure that the to_date is later than ...
0
votes
0answers
9 views

Add custom fields to image attributes

In short: I've added custom fields to my media library uploads. How can I add the custom field information to my images? I want to use Pinterest on my site properly. Pinterest suggests to add data-...
1
vote
0answers
16 views

Organize media library into folders and get folders via WP Rest API?

I'm building a Vue/NuxtJS portfolio site that will hopefully use WordPress as a headless CMS. I've been searching for hours but can't seem to come to a definitive solution. I know it's possible to ...
0
votes
1answer
25 views

post values to custom post type which has advanced custom fields

I am trying to use Ajax and jQuery to post data to a custom post type. The title field works as is standard wordpress field but the color field does not. I also tried replacing 'color' with the name ...
0
votes
0answers
10 views

Display all videos on separate page from certain ACF field

I am using Elementor and ACF. Using ACF I created oEmbed field for adding videos for each post. Idea is to show all uploaded videos on separate page. So on separate video page I want to display all ...
0
votes
0answers
6 views

How to update ACF options page field with AJAX?

I have a path from ACF REST API, I want to update that value from the front, with AJAX. How I can how to do that, but the important thing is anyone can access it, so I have to put it away 401 code. ...
0
votes
1answer
25 views

ACF Map with custom styles field

I have an option page where i can create maps, i created a custom field to paste my own styles. What i need to do is pass this informations in my maps.js. What i have done is create an hidden div like ...
0
votes
0answers
25 views

How do I output ACF custom fields within the_content() AND strip tags?

I'm trying to output a text-only version of the_content, that includes all custom blocks. echo wp_strip_all_tags( get_the_content() ); strips tags and outputs text only, but only for native content. ...
0
votes
0answers
15 views

Change page post status based on acf field value

I’m kinda newbie to coding, I have just made a new wordpress site that uses advanced custom fields on backend (all fields are global fields in added options menu) from where front end pulls the values ...
0
votes
2answers
17 views

Use ACF Category Image for all Taxonomy Archive Views

I’m wondering if you could help with some code I’m struggling with. I’ve got an ACF Image Field on the Post Category Taxonomy. I need to add it into the post loop so the category image shows up ...
0
votes
1answer
42 views

Need help in setting up a transient using API Key and if possible updating it in the ACF field

I am trying to set up a shortcode that will fetch Moz API data but I am facing issues. Sometimes, it returns values to 0, and sometimes it works. I don't know what I am doing wrong here. Might be I ...
0
votes
0answers
12 views

Gutenberg blocks for custom user role

I'm trying to hide all the default gutenberg blocks except my custom ACF blocks. The problem is, I created custom user role : student. With administrator role I got my custom block introduction but ...
0
votes
2answers
51 views

Custom sorting in post columns by ACF Pro Select Field

I'm adding a custom column to the admin display for a custom post type. The custom column should display the selected options from an ACF Pro select field. Instead, it always triggers as containing ...
0
votes
0answers
17 views

Rewrite permalink for each post in custom post type with custom field?? (no custom-fields-permalink-redux, doesnt work)

Please, dont tell me to use custom-fields-permalink-redux because that plugin is broken and hasnt been updated. I am trying to rewrite all permalinks for a custom post type with a custom field. I ...
0
votes
0answers
25 views

Edit (advanced) customs fields on page template

OK I'm freaking out a little bit here :) Step back. I have to make some changes to a wordpress website (with a custom template) that I "inherited" from another guy, which developed it in 2015 and ...
0
votes
0answers
22 views

How to restrict access to wordpress upload by specific user

I've added this to the downloads.php in woocommerce my account: <?php $current_user = wp_get_current_user(); $file_for_client = get_field('upload1232423', $current_user); if( $file_for_client ) :...
0
votes
1answer
16 views

Get full image array

When I use Advanced Custom Fields I can return the full image array of an upload. Is there a native WordPress way to get the full image array for any image in the Media Library by image ID? I can find ...
0
votes
0answers
24 views

ACF repeater field in WooCommerce Custom Tab returns “Array”

I want to use custom tabs with an ACF repeater field. So far I have written this: if( have_rows('faq') ): add_filter( 'woocommerce_product_tabs', 'faq_tab' ); endif; function faq_tab( $tabs ) { ...
0
votes
0answers
17 views

ACF Posts in Theme Options only returning when logged in? Bug?

I have a sidebar widget I've whipped up that uses ACF's Post Object to get some specific content from my site. However, I've noticed when I'm not logged in that it returns empty. Why is that? I can't ...
0
votes
1answer
33 views

WordPress query: merge meta key (number) values and sort

There's a lot of great documentation on multiple column sorting using orderby however I can't seem to find a good WP_Query solution to this problem. Each post has two meta keys: rating_au and ...
0
votes
1answer
11 views

Fill custom select field with pages/post titles

I'm just getting into the world of SAGE development and at the same time, I'm using the Advanced Custom Fields plugin. Let's say, that we have created two custom post types (Professors, Lessons). ...
0
votes
0answers
16 views

make p tag collapsed after 3 rows

I looking for a way to show a read more link underneath my P tag after 3 lines have been displayed so the user can click the read more then it will show the rest of the text (if its paragraphs long) ...
0
votes
1answer
37 views

How to use ACF with javascript to update cusomt 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
106 views

How to add a custom field to quick edit

How can I add a new column to quick edit and put a custom field in it? I read this question but one of the links lead to an error 404. I need a new column for my custom meta key, "summary" and post ...
0
votes
0answers
15 views

acf_form: update field of each post for each subscriber

I created a field with radio button in the post visible in the front end with acf_form I wish every subscriber can use this field to select one of the following options with radio button: “Read”, “...
0
votes
0answers
14 views

How to organize Backend by Category instead of Post Types?

i've made a lot of different Wordpress-Websites but my new Project kind of frustrates me. It's a Website for a Sportsclub with several departments. Each department has "News", "Teams", "Shedules" and ...
0
votes
1answer
24 views

ACF Update_field() update the field but changes are not seen in backend or rest api

I have a custom field for User type where I can link an attachement ID. I'm trying to save the attachment ID programmatically and it looks like it works, because when I run get_field($my_field) I have ...
0
votes
0answers
47 views

How to get ACF from an event page (using Modern Events Calendar)?

I'm using the plugin "Modern Events Calendar Lite" which is great so far. For this I added a custom field (ACF) for each event which I'd like to display in the event list. However, I cannot manage to ...
0
votes
0answers
4 views

Sort wp_query by variable created inside the loop

I have a custom loop that pulls all the child pages of the current page, and displays them. However, I need to order this query by the $first_row_image variable that is created inside the loop. This ...
0
votes
0answers
22 views

In ACF, create list of terms to be selected by another ACF option elsewhere - is it possible?

What I need to do, is on my ACF Options page, have a list of 'Terms', or actually they will be an enumerated list of 'Categories', which can then be selected from to set another field elsewhere in my ...
0
votes
1answer
33 views

Help with with my function for wordpress

i have a question if i wanted to hide the title if nothing is entered how can i achive this with this fuction i would be greatful for any help add_action( 'woocommerce_single_product_summary', '...
0
votes
0answers
25 views

ACF Front end field checkbox with: Mark as Read

I have to create a field in the front end for each subscriber that can mark the post as read. I want to set a flag, so a user will know which post he has read and which he has not read. Perhaps the ...
1
vote
1answer
35 views

Hide custom field if empty

I'm displaying values from a custom taxonomy on single pages of my custom post type. I have a custom post type "artwork" with a taxonomy "artists". How I display the artist name on the single post ...
0
votes
1answer
15 views

Load info from customposttype into template page

So I have a Custom Post Type called members. to this custom post type, I have ACF linked with a form to make an account In this post type are users made and stored. Now I want to retrieve all ...
0
votes
1answer
19 views

Connect ACF field + custom taxonomy [closed]

Given: 1) Advanced Custom Fields. A select field with predefined values. 2) Custom taxonomy of the custom post type. Q: Can I link a selection in the ACF field for automatic taxonomy assignment? For ...
0
votes
0answers
12 views

ACF pre_save_posts submitting on page load

I have a form using all ACF fields. I want to submit the form to a custom post type and set the title. However when I just load the page, the form is submitting. I'm using the same example off of the ...
0
votes
0answers
13 views

How do I change the functionality of an image slider which is part of ACF?

I have an image slider on a page which was created as a Custom Field. The field type is called "Repeater", and each image automatically slides to the next. All I want to do is remove that automation ...
0
votes
1answer
28 views

create custom shortcode wp and put php code in

i use ACF plugin and i want put this query in shortcode. but i have a problem. (not output anything) add_shortcode('pishnahadi' , 'kn_inline_related'); global $post; function kn_inline_related( $...
1
vote
1answer
43 views

Check if checkbox is marked on publish/update post

Updated with working code here: add_action( 'acf/save_post', 'fritlaeg_artikel_3m' ); function fritlaeg_artikel_3m( $post_id ) { if( get_post_meta( $post_id, '...
0
votes
2answers
48 views

Recoverable Fatal Error - Object of class WP_Post could not be converted to string

Im using ACF and trying to show a post type title based on the current time. So I have my post type entry with start_time and end_time and my conditional is showing my div.onAir, but Im getting this ...
2
votes
2answers
18 views

Pull image from ACF field in a Custom Post Type

Hopefully, I can explain this well enough, but let me know if not and I'll expand on it. I've used ACF in conjunction with a Custom Post Type, but when I try to grab the photo that I've uploaded for ...
1
vote
1answer
15 views

ACF Image ID, echo the alt tag

I"m just ACF, and i've created and Image as an ID. The code is all working perfectly apart from the alt tag isn't being outputted. What have I got wrong? <?php $attachment_id_desktop = ...
0
votes
0answers
44 views

Advanced custom field in orders email and on order page (order history)

I have a working code i will post it below. my problem is i have a custom field (stock_number) which i display in orders email and on orders page instead of the default woocommerce title. everything ...
1
vote
0answers
12 views

ACF Values Don't Show After Import Unless I Edit/Update Post

I am importing CPT's using WP All Import which include ACF field values. When I import, the values don't show on the front end unless I open/edit/publish. I have tried several options including bulk ...
1
vote
1answer
32 views

Importing hard coded custom field into acf field

I am in the process of migrating posts from an existing wp site into a new wp site. The existing site has a custom field called subtitle. When I import the blogs into the new site, I'd like populate ...
1
vote
0answers
44 views

ACF Upload Image in repeater from front-end with custom form? - add_post_meta()

I want to upload images in the ACF repeater. That repeater means the gallery of page. Point is to create post in custom post type using add_post_meta() method. Here I have the form : <input type=...
0
votes
0answers
24 views

Automatically fill in the ACF Google Maps field

I have multiple fields to insert an address (street, postal code, city). At this moment it's not possible to add these on a map or search for locations nearby you. That because I don't have to long/...
1
vote
0answers
20 views

Setting ACF for Category and for all subcategories [closed]

I'm building a website with multiple categories and subcategories, and some of those categories need some advance custom fields to work properly, and for them to have the necessary data i need to be ...
0
votes
0answers
13 views

Imported posts images not visible in front end (ACF Gallery)

I am trying to export some posts to another blog. This blog uses ACF plugin with a gallery field. The images get imported in back end but do not show up in front end until the post is manually updated....
0
votes
0answers
30 views

ACF Group Field in add_post_meta?

how I can fill field in ACF Group Field in add_post_meta? This is maybe useful, I tried something, but it doesn't work. $values = array('value 1', 'value 2', 'value 3'); Now the code to insert the ...

1
2 3 4 5
25