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

ACF: How can I publish values of ACF fields in a loop while using wp_query?

I'm using ACF to add fields to a custom post type. I've created an instance of WP_Query to set up a loop. Within the loop I can publish the standard fields using the_title() and the_content(). However,...
0
votes
1answer
9 views

Wordpress - display relationship between blog posts and custom posts

I created through ACF a relationship between blog posts and the custom post type, which contains employee profiles. Through the relationship, I am able to display links to the employee's profile, who ...
1
vote
0answers
14 views

Saving an array of dynamic repeater data as post_meta

Looking for some Wordpress specific PHP help. I'm making a time sheet with employees listed and in/out for everyday of the week. I am pulling an ACF repeater row of employees from another page that ...
0
votes
0answers
13 views

I cannot get an Advanced Custom Field code snippet to work - and ACF support say it should work

I am trying to get the below action to display on an archive page on my site via Code Snippets: add_action( 'woocommerce_after_shop_loop', 'test_text', 42); function test_text() { the_field('...
0
votes
0answers
12 views

Make “ACF V4 star rating field type” compatible for Advaced custom fields 5 [closed]

Hello every body i want to make this ACF 4 Star rating plugin compatible for ACF 5. Who can help me please. I installed the plugin but i can not see star rating field among other field types. This is ...
0
votes
1answer
22 views

How can I force Dynamic CSS via ACF values to update on page load?

I'm trying to dynamically change the background color of a post on scroll to colors set in post options via an ACF color picker. I was able to source enough code examples to get it working (I thought) ...
0
votes
0answers
14 views

Show all entries from an ACF Field

I have used ACF Pro fairly successfully thanks to these forums and I am back once again for help as I am clearly not a programmer! I created a new WYSIWYG field and added it to my Custom Post Type. I ...
-2
votes
0answers
10 views

What is the benefit of having forms so tightly coupled to post pages/user meta, etc.?

This is more of an architectural designs within the WP space question. I've been navigating the world of WP forms and I just can't understand: why are all plugins made in such a way that you can't ...
0
votes
1answer
21 views

ACF Field Groups Collapsed by Default

I want my ACF field groups to be collapsed by default on the page edit screen so admins aren't confronted with an intimidating page full of fields when they land on the edit screen. I found this page ...
0
votes
0answers
13 views

Refresh (Update) all posts meta without changing any data

I use ACF plugin. Today all my posts look wrong until i manually click "Update" on the post editor. How can i simulate clicking the Update for all posts? Bulk editor update doesn't refresh ...
0
votes
1answer
44 views

How to update an image attachment's alt text from a custom field when saving a post?

I created a block that has an image field and three text boxes: a textfield for the image alt, a text area for the description and another text field that was created in ACF to allow for photo credits ...
0
votes
1answer
27 views

Can set_post_thumbnail be used to remove a thumbnail?

I have a way to set a thumbnail for a post if a checkbox is selected or not. The problem I'm having is if the checkbox is selected and then unselected, how do you delete the featured image that was ...
0
votes
0answers
17 views

ACF - Compare Products Table Layout - First Column to show common fields

I have created a product comparison table. Currently all the selected products show up in separate columns. I would like the first column to show common header and rest of the column to only show the ...
0
votes
2answers
14 views

How Do I Use a ACF Custom Field To Add A Slider ID?

soliloquy( the_field( 'slider' ) ); This is my code to add the ID for a slider from a ACF number field to a slider function call however it outputs the ID and doesn't execute the soliloquy function. ...
0
votes
0answers
19 views

ACF: How to programmatically Update Flexible Content Field?

I want to be able to create sub fields inside a flexible content field. My setting is this one: menu_item_field is a flexible content field that contains: 1.1 menu_item_parent (text) 1.2 ...
0
votes
1answer
14 views

ACF Field value in wordpress login message filter

I am trying to add a custom message after the WordPress logo on the WordPress login form, I am using the ACF field on the home page to echo the value on the WordPress login page, I have mentioned the ...
0
votes
1answer
16 views

ACF - Eliminate unnecessary data and print

In ACF, the_field('battery'); outputs as follows : Battery : Sony Rechargeable Ni-MH 2200 mAh battery or Battery : Energizer AA Rechargeable Batteries 2300 mAh NiMH How can i achieve this (showing ...
0
votes
1answer
27 views

ACF - Pick first or second value from comma separated values

Everyone, I have just started using ACF and mostly using feature to show data uploaded from csv file. Everything is working fine. But in some fields i have data in the form of comma separated values ...
0
votes
1answer
37 views

Dynamically fill a post custom field with post publish date

I created a custom field using Advanced Custom Fields (but I think ACF is optional) and I want him to dynamically fill the publish post date when I publish a post. Example : If I publish a post today, ...
0
votes
1answer
15 views

How to retrieve a Menu Name by Menu Location with ACF fields

What WordPress function can be used to retrieve a Menu Name using the Menu Location as parameter?
-1
votes
1answer
35 views

How to search pdf attachment?

I am using advanced custom fields to create a custom field. I created a custom field called upload pdf. I can attach the pdf file using this field and the field type is File. Suppose there is a ...
0
votes
0answers
10 views

Wordpress ACF passing a variable as a value into args array

I'm trying to create a dynamic posts layout. In the backend, I have a field where I enter the slug of the post collection I want to pass in. The $subfield value is recipe. For some reason, when I ...
0
votes
0answers
13 views

Is it okay to use an ACF field to store a password for a protected area of a page?

I was wondering how secure it is to use a simple ACF text field on a page to store a password for a certain area of content on the page? So the user would have to enter in a password in an input field ...
0
votes
0answers
11 views

Retrieve repeater sub field (image) from an Options Page - ACF

I have a similar issue -- I made an ACF called Icon (post id is 348) and linked it to my Options Page called School Settings Inside of Icon, I have a field called School with a name (school_header) ...
0
votes
1answer
24 views

How to set acf color field as background color to product category

I have set an acf color picker field for woocommerce product category. I would like to set this color as a background to the category name that I've printed on the product page. I've tried to set the ...
0
votes
0answers
19 views

Display Term form on a custom page

so I have a custom admin dashboard page where I display the terms hierarchy (for a better UX). My goal is to display the term form on a custom admin page having the term object. I tried displaying the ...
0
votes
1answer
18 views

Is there any way to bulk search-replace URLs that exist within ACF's “Link” field type (serialized)?

I have a list of 500+ URLs that need to be searched and replaced This is a spreadsheet with two columns, the match URL and the replacement URL I've been using wp search-replace --all-tables 'foo' 'bar'...
0
votes
0answers
14 views

Taxonomy term page not listing linked products

I have created a custom taxonomy named "Contributor" with the following code: if ( ! function_exists( 'contributor_custom_taxonomy' ) ) { // Register Custom Taxonomy function ...
0
votes
0answers
12 views

Prevent block from being used in main editor, use only as inner block

I am currently using the allowed_block_type filter to control the available blocks in my theme, similar to the following example: function acf_allowed_blocks($allowed_blocks, $post) { // Register ...
0
votes
1answer
26 views

Query Product categories what have a custom field

Im trying to build a page template on wordpress that will show a list a categories that have a custom field checked. So the taxonomy is just the default woocommerce taxonomy product_cat I then have a ...
0
votes
1answer
21 views

Getting user data via ajax

I am trying to list registered users on the frontend which have a role of 'member'. I have a lot of advanced custom fields for the users though and don't know how to get those fields. I installed the '...
0
votes
0answers
16 views

Manage data of different posts in one settings page (ACF field)

I have a post type for cars. Suppose there are (about 500) cars in 500 different WordPress posts. Is there a way to update the price field of all cars in a settings page every day? And you do not need ...
0
votes
0answers
42 views

How to count the number of ACF rows that have values?

I'm trying to count the number of acf rows that are storing values. The field is a repeater field and all rows are standard text fields. They are available on as a user meta field. Some users won't ...
0
votes
0answers
9 views

Add repeater field data to only selected post

I have a wp_query with the while loop, I added a form for each post when I submit the form data it submits to other posts as well instead of submitting to the current selected post. <?php $query = ...
1
vote
1answer
18 views

WP_Query ordering numbers as letters

I have some meta_fields in user profile created with ACF plugin. I am trying to run a query to get users with the following criteria: User must have meta_field jogador_profissional == true List of ...
0
votes
0answers
19 views

add custom fields ACF to a Taxonomy Term

i need to costumise tag names and category names in the category.php pages, using ACF : This is my code it's refered to this link : https://www.advancedcustomfields.com/resources/adding-fields-...
0
votes
1answer
18 views

Transitioning Laravel App into WordPress (Portfolio Website)

I'm re-creating my website in WordPress since I can't afford to provide the financial upkeep for my Laravel Portfolio website. In my Laravel application, I have an easy way of creating a new project (...
0
votes
1answer
16 views

ACF unable to use user field

I am totally new to wordpress and acf and I'm trying to use a user field in a post to show the author of the post. I tried to programatically add the post author id as a meta attribute in the ...
0
votes
0answers
27 views

ACF Repeater dates => slow query

For events module, I'm using ACFPro with repeater fields. Everything work well except the query takes 21seconds. As you'll notice, the end_date has to be > than today or empty. (I thinks this it ...
0
votes
3answers
96 views

How to give each category name its own ACF background color?

I'm building a webshop, and started to configure the product loop on the shop archive page. I display the product category related to every product, and I would like to set to the categories to have a ...
0
votes
1answer
15 views

If Statement is Ignored?

I’m trying to update a boolean custom field based on whether a post has ‘expired’. A post is considered expired when its publish date exceeds 30 days. To check this, I am retrieving the post publish ...
0
votes
0answers
78 views

Add PDF to ACF image field from file url

I am basically looping some fields from a gravity form entries. I using this function below to pass a file url into $filename and convert the file into a media library item, and then attaching that ...
0
votes
1answer
21 views

Use WPQuery to match to specific repeater row in post

So i have a repeater inside post-type 'properties' that stores Lot No and Auction Date for all the Auctions a property is in. When going into an event page, say for 12th August it needs to list all of ...
0
votes
0answers
10 views

Can I insert ACF repeater fields into MaxMegaMenu via JS?

I have to add a Slick slider with ACF repeating fields to MaxMegaMenu, unfortunately I don't know how to add such a large piece of code via Javascript (passing js Var?). Has anyone tried to add ACF ...
0
votes
1answer
10 views

ACF Fields are not showing up on Homepage

I want to Customize the Yith Plugin for which I want to add some custom fields with Existing fields. I am getting fields from ACF and adding them to an array ACF Fields are showing up in Yith Setting ...
0
votes
0answers
12 views

Trying to get a $_POST ACF meta value to save to xml file using simpleXML

I am working with the publish_posttype action to get data of post as it's getting published. I pushing these values to an xml file using simpleXML. I can get things like post title easily since that ...
0
votes
0answers
9 views

WP All Import Woocommerce Order Import - User Meta Linking

All, I have a WP All Import setup to upload orders to Woocommerce, which works fine at the moment. During user registration we ask our customers if they want their orders delivered or pickup in store. ...
0
votes
0answers
39 views

Query on a repeater date (acf)

I'm struggling with this. I a have list of date (not fixed, I can have as many date as I want) made thanks to the ACF Repeater. In my query, I want to filter by date. But, I have to hide some post if ...
0
votes
1answer
25 views

Override not echoing my string or dom element

Hi all I'm kind of new to WordPress. I have created an override for WooCommerce and I'm trying to echo a DOM element with an Advanced Custom Field in it. I've used this code. <?php if (the_field('...
0
votes
0answers
55 views

Get with jQuery the value of an ACF field

I'm trying to store in a variable the content of an ACF field so that later on I can use it in a jQuery function using the plugin "Simple Custom CSS and JS". I found what I thought was the ...

1
2 3 4 5
27