Skip to main content

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

DIV containing iframe disappears below break point of 992 in Oxygen Builder

I have a dynamic CSS grid using a repeater in Oxygen Builder that displays a mix of images and videos from an ACF repeater. I have used the following CSS which works fine up to 992px. .embed-...
philthebass's user avatar
1 vote
1 answer
1k views

Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?

I am working on an online magazine in WordPress PHP (with Advanced Custom Fields plugin). I specify the date of the article's publication with 'date picker' field. Even though for articles ...
Curious Programmer's user avatar
1 vote
0 answers
385 views

Updating post object via ACF breaks front-end

I have set up a working WP Insert post, that loops through my API call. I am then updating my ACF post object field which is successful but... I am encountering an issue when I update my ACF post ...
EpicJacob's user avatar
0 votes
1 answer
117 views

Why custom search engine only searches in post titles of custom posts?

I am working on a custom search engine for a custom post type (articles) with custom fields in WordPress PHP (online magazine). It works almost fine, the only problem is that somehow the search is ...
Curious Programmer's user avatar
-2 votes
1 answer
105 views

How can I use Advanced Custom Field Option page in CSS Wordpress

enter image description here <?php header("Content-type: text/css; charset: UTF-8"); //look carefully to this line $primary_color = " get_field('primary_theme_color', 'option');&...
Mayur Tech's user avatar
0 votes
1 answer
540 views

How to get all specific fields from one ACF Group?

I have created few question/ answers using ACF. Field names are question_1, question_2 and so on. My codes are: <?php if (get_field('question_1') == 'yes') && (get_field('question_2') == '...
Ricky's user avatar
  • 53
2 votes
1 answer
488 views

How to detect if an ACF custom-field is really in use?

I want to find out if a custom-field is in use for a post or term. That means the custom-field has a content and is not empty. I guess that's more difficult for selects, radio or checkbox-inputs. So ...
André Kelling's user avatar
1 vote
2 answers
3k views

Elementor Custom Query to get Posts by ACF (Post Object Field [closed]

I have two custom post type Author and Book. The book cpt have an ACF Object Field (authors_object_field) that is related to authors. On the author single page i want to display all books that have ...
AKEAmazan's user avatar
0 votes
1 answer
512 views

Display ACF object field data using Elementor Custom Query

Hello i'm working on a website using elementor pro + ACF. I have create a custom post type (CPT1) with ACF object field that take another CPT2 as values. I would like to display on my CPT1 page all ...
AKEAmazan's user avatar
0 votes
1 answer
810 views

Custom WordPress Function - Adding items from Foreach Loop into an array and Updating Field based on array of IDs (ACF + WooCommerce)

I've searched far and wide for a solution to the problem. I'm almost there, but can't seem to get it working completely. Background There are 3 post types that are involved in this function: League, ...
chris's user avatar
  • 3
1 vote
0 answers
114 views

How to link ACF relationship field to the new Query block in Full Site Editing

I am using the new Query block on WordPress Full Site Editing and I am trying to figure out how to connect that to the ACF relationship field. So I have an ACF field on my category that allows the ...
Ibrarr Khan's user avatar
0 votes
1 answer
379 views

Get posts using multiple values from ACF checkbox as meta query wordpress

$args = array( 'posts_per_page' => -1, 'post_type' => 'products', 'meta_query' => array( array( 'key' => 'colors', 'value' =...
goodnight sir's user avatar
0 votes
0 answers
17 views

Why do my quick edits for custom taxonomies not show on the post frontend?

So I have created a couple of custom taxonomies and to save time I used the quick edit to apply taxonomy terms to posts. The problem is these changes don't show on the frontend. When I go in to edit ...
Ibrarr Khan's user avatar
1 vote
0 answers
2k views

How to create repeater field manually, without plugin (ACF Pro)?

Looking for a way to register a custom field to appear on specific pages or post types, that would behave as a repeater, whose content I could then get on the front. Paying for ACF Pro for one small ...
nickelodeon's user avatar
0 votes
0 answers
92 views

Widget Code / Advanced Custom Fields / Elementor

I manage a site that needs to display a widget from a ticket provider, code included below. The widget code is the same on every page the only variable is the event ID. With a different widget I was ...
user2008101's user avatar
0 votes
1 answer
1k views

Show posts associated with ACF post object and custom post type

I have a custom post type called "team". I created a Post Object with the ACF plugin which Filter by Post Type value of "team" and I target the WordPress Posts for the location. ...
Yordan Kostadinov's user avatar
0 votes
0 answers
123 views

Optimising WP_Query with ACF Fields

I am wondering if it's still possible to optimise the WP_Query or also if there's another way of doing it. I have the post type and a custom post type called case-study which gets displayed on the ...
Erick T's user avatar
1 vote
1 answer
657 views

Generate the post title from ACF fields

I want to generate post title from first name and last name which are two fields. The posts are generated in WS Form and saved with no title. I tried this code however it does not seem to work. Any ...
Omid's user avatar
  • 11
0 votes
0 answers
270 views

ACF repeater + group shortcode

I've wrote a few line in order to show a restaurant menu in a page using a shortcode add_shortcode ('pescato_repeater', 'pescato_repeater_fn'); function pescato_repeater_fn() { if( have_rows('...
Enrico's user avatar
  • 11
0 votes
2 answers
887 views

ACF get_sub_field ALT TAG in the repeater doesn't show

I have one problem. I can't get the alt tag inside me repeater fields in ACF, I've tried multiple methods and nothing works for me, could you please help me? I can't fix this problem for a week :( ...
Tanya Nami's user avatar
0 votes
1 answer
118 views

How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]

I am using ACF Pro to make a relationship between two custom post types. One CPT is a thing and the other is a Container of Things. I need to solve the issue of things within a container of things ...
Jordan W.'s user avatar
0 votes
2 answers
111 views

Upload non-featured image to image field

I'm trying to upload some associated media to a custom post type. Using file_put_contents() I'm uploading an image and trying to set an ACF image field to be the path to that file. But reading the ...
Fluxian's user avatar
  • 130
0 votes
2 answers
5k views

getting image from ACF

I've got a custom field set up using Advanced Custom Fields - the field is named "Company Logo" and is an image field which is returning an image url. I've tried the array and the image ID ...
TridentMarketingUK's user avatar
0 votes
2 answers
50 views

Need to search a custom field (ingredients, one long string per post), but want it to allow phrases/non-exact matches

So I have a complex list of ACF repeaters for ingredients, but have a save hook to store them all as one comma delimited text string in a custom field to help. My current "advanced" search ...
gokujou's user avatar
  • 101
0 votes
1 answer
728 views

TinyMCE's "Clear Formatting" button doesn't remove lists and headings

Pressing the "Clear Formatting" toolbar button removes styles like bold and italics just fine, but it leaves lists and headings (h1, h2, etc.) as-is. Is there a way to include all elements ...
Gavin's user avatar
  • 404
0 votes
1 answer
311 views

Function wp_enqueue_style was called incorrectly

pretty new to this... can anybody tell me what i am doing wrong? Notice: Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the ...
GWM's user avatar
  • 1
0 votes
1 answer
88 views

Exclude in get_pages() based on meta field

I'm using get_pages() in order to get all the posts from a custom post type hierarchically for creating a custom "next/previous" navigation. I use it like this: $sibling_list = get_pages(...
knox's user avatar
  • 101
0 votes
1 answer
219 views

How can I hide the ACF shortcode when empty

I am facing a issue. I am using a snippet from github. It renders the URL with some attributes. However, when empty, the short code is still displaying and is not being hidden. Here it is: /***********...
Rogger's user avatar
  • 13
0 votes
1 answer
65 views

What snippet do I need to type to show my ACF field show up on my theme?

I've been trying all kinds of things but I can't get it to work cuz my Theme single.php looks different that usual. I made a field in ACF named Region and then enter for example USA which I need to ...
Space Money's user avatar
0 votes
1 answer
589 views

Search using ACF repeater

I created a repeater containing Q&A and I would like to develop a search field that looks inside the ACF Q&A repeater for the related result. Could anyone help me where should I start? Thank ...
Luanna C. Iozzi's user avatar
0 votes
1 answer
279 views

Show/hide posts and categories based on user meta

I've added additional input fields to the user profiles with Advanced Custom Fields (for example "type of customer"). How is it possible to hide posts and categories for users with specific ...
Mario's user avatar
  • 101
0 votes
0 answers
100 views

Add class to all img if they have a certain ACF field

I have an ACF field for image attachments so the user can choose 'rounded border' or 'square border'. How can I apply a class to all images depending on the value of that ACF field? I can do it if the ...
L Waterfield's user avatar
0 votes
1 answer
129 views

Add php code to wp_print_scripts?

Is there a way to add inline php code to the editor using wp_print_scripts? I'm trying to find a way to display text from a php string into a value of input of a block. Here's my code: function ...
Gregory Schultz's user avatar
1 vote
0 answers
260 views

How To Save Data From Remote APIs To ACF?

I've been attempting to ingest remote data from an api partner into Wordpress. To data I've used wpallimport plugin, but it's quite limited. How would one connect with a remote api and then save the ...
MisterTamper's user avatar
1 vote
1 answer
61 views

list/consult Taxonomy only for the respective author/creator in dashbboard

I'm trying to filter so that only the creators of the respective categories can edit them. I created a cat_author meta field and associated it to the taxonomy. In this way, every taxonomy has an ...
naber brene's user avatar
0 votes
1 answer
42 views

comments_where Hook

Is there a similar replacement of the hook posts_where for comments (WP_Comment_Query)? I need to modify the where clause for a comments query like it is shown in this tutorial (“4. Sub custom field ...
Silas_229's user avatar
0 votes
1 answer
83 views

ACF to select posts not displaying on blog page

I am trying to implement a repeater / post object so I can select posts that I want to displaying on the sidebar. I am using this code: <?php while ( have_rows('top_posts_repeater')) : the_row(); /...
Leandro Andrade's user avatar
0 votes
0 answers
196 views

Having a repeating custom field in admin custom post type, what I'd go better with, for DB's sake? ACF repeater or query a different post type?

I have: A main custom post type - 'Cards' - each post showing its ACF repeater custom field - 'operations' - with the following sub-fields: 'add/remove', 'amount, 'value', 'date'. Let's say the fully ...
PatrizioRD's user avatar
0 votes
1 answer
938 views

How to inherit field value from parent post into in child / sub post

I have created a custom post type, called 'centres'. This CPT is hierarchical, ie, I can create child pages under each custom post. Centre1 Location1 Contact1 Centre 2 Location2 Contact2 I've ...
RedWebMan's user avatar
0 votes
0 answers
135 views

Get ACF taxonomy term and sub-term lists ACF blocks

I want to get list of parents and child terms from ACF field type Taxonomy. This things need to display as ACF blocks. i have tried many things to done this stuffs but but it's not working for me. ...
sunil singh's user avatar
0 votes
1 answer
1k views

How can I add a shortcode to query Custom Post Type with ACF in Wordpress?

I am building a website for a client, and I needed to build a game release calendar using Custom Post Type and Advanced Custom Fields. Everything is built out, but the last step. I need to be able to ...
M. Straw's user avatar
  • 119
0 votes
1 answer
309 views

Rewrite comment form post ID on submit

I have a WordPress comment form, with a custom field (added with the Advanced Custom Field plugin) where the visitor can chose from a options (these are page IDs). When submitting the form, I want ...
Karl's user avatar
  • 1
0 votes
1 answer
433 views

ACF: If field contain a specific value, update value in another field programatically

how can I change the value of a field based on the value of another field programatically? This other field has already a value but I need to replace / update it. To be more precise: If the Text Field ...
Richdn's user avatar
  • 1
1 vote
1 answer
696 views

Display post in order of ACF checkbox?

I have a custom post type called ‘Skateboards’. Within the custom post type of ‘Skateboards’ , I added three checkboxes (filed type checkbox) with a field name of ‘skateboard_performance’ associated ...
jonTronics's user avatar
1 vote
1 answer
504 views

ACF: replace comma with another sign [closed]

I am using ACF. I am using this function to display numbers in number fields in this way 1,000.00 // Return ACF Number Fields Formatted with Commas on the Frontend add_filter('acf/format_value/type=...
SaStress's user avatar
0 votes
0 answers
1k views

Getting "Years Only " from ACF Date Picker field to Hidden filed in the fields group

I have a Date Picker field and text field, or hidden field, can I get the year filled up to the text field or hidden field when filling up the date picker filed? this is for a filtring reason I do ...
Faris Jamil's user avatar
1 vote
0 answers
249 views

How to only show ACF field if another block is being used?

I'm developing a tab system on my site and I want to build the contents of the tabs using ACF blocks. I have a "Tabs" block which handles the titles of the tabs. I have linked the index ...
user1589375's user avatar
0 votes
0 answers
141 views

Delete images from media library when user deletes an image from ACF Gallery

When a user deletes an image from the gallery in wp-admin I need it to be deleted from the media library too. I have a function using the acf/update_value hook which works uncorrectly. When a user ...
Da Markuzz's user avatar
0 votes
0 answers
207 views

How to create a search form with multiple search fields

I have a client that would like to add a search facility to their site but... They would like to allow the user to search various different custom fields. Here's an example of the sort of thing I'm ...
Tom Perkins's user avatar
0 votes
1 answer
1k views

ACF - Retrieve custom taxonomy from a relationship field

I have a custom post type, called prognosis with 3 custom taxonomies, Country, Competition, and Sport, I've also added a few ACF custom fields. I have another custom post type called analysis with an ...
quantum_leap's user avatar

1 2
3
4 5
31