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
0 answers
13 views

WP_Query filtering in ACF field containing dates

I'm trying to use WP_Query to filter Advanced Custom Fields posts that can contain this value in the "dates" field (text type), for example "20230101-20230102;20230201-20230202;20230301-...
jakr's user avatar
  • 1
0 votes
0 answers
17 views

How can I filter records in a custom post type list in the admin based on the ACF field in the post that contains the current user?

I have a custom post type called Projects that includes an ACF field named team_members which uses User as a field type and returns a User Array. I want to filter the post type listing so that the ...
Rizal Kholif's user avatar
0 votes
0 answers
21 views

How do I add a filter to my custom post type archive page?

I used the guide HERE from acf themselves, but for some reason whenever I attempt to query anything at all in the url I get the "There has been a critical error on this website" error. $...
judahking's user avatar
0 votes
1 answer
15 views

Cannot get user's ACF data when using a template part in a WP_User_Query

I'm using a template part to repeat the HTML for each result when performing a WP_User_Query to return a list of users. However I am finding that the Advanced Custom Fields data isn't returning. // ...
greatsplott's user avatar
0 votes
0 answers
46 views

Add ACF fields to Repeater items when using REST API

I am currently building a Headless site using WordPress as a CMS, coupled with Nuxt 3, bridged with the REST API. So far, everything’s been great, but I’m struggling with how to retrieve the ACF ...
Alex Ryans's user avatar
0 votes
0 answers
15 views

ACF true/false field in a custom dashboard widget?

I have a true/false ACF field a setting on my site. I was thinking that instead of burying it in an options page I could create a dashboard widget so it can be toggled on and off right from the main ...
user13286's user avatar
  • 403
0 votes
0 answers
11 views

Adding a custom field of code to a squeeze page

I'm trying to add a custom field to a squeeze page side bar. I have added a widget containing code for default pages so that a certain form appears on those pages in the side bar. I've been trying to ...
Ivor's user avatar
  • 1
0 votes
0 answers
34 views

How to add new ACF repeater row after removing all rows using jQuery/Javascript

I am creating a custom ACF Field within a page edit screen which I have added a div container, outside the container is 3 buttons. Add text block, add image and save. I also have a repeater field (I ...
DigitalDesigner's user avatar
0 votes
0 answers
24 views

Array_splice index problem in ACF Flexible Content

I want to insert a row layout from an ACF Flexible Content field in one page (templates page) into the Flexible Content that is assigned to another page (Original). The Flexible Content field group is ...
Horizzons's user avatar
0 votes
0 answers
87 views

warning: trying to access array offset on value of type bool ACF field image group

I have a problem with an acf function for displaying an image by array. I can get my image to work well when I upload it to the field associated with it. On the other hand, when I don't put an image, ...
Thica's user avatar
  • 15
0 votes
0 answers
35 views

Add "reviewedby" in Wordpress posts

​Hello, I was wondering if there is a way to add "reviewedby" + name (potentially with a blue checkmark) under the author as displayed in the attached example. ​Also, I would like users to ...
User3591's user avatar
0 votes
0 answers
33 views

Phone number custom field and woocommerce updating issue noticed

I use Wordpress user frontend plugin to allow guests to post their woocommerce product on my website but I have observed some issues. Firstly, I added a phone number field in the form, then also added ...
Titus's user avatar
  • 1
0 votes
1 answer
39 views

How to capture number input from wordpress form into acf field in woocommerce

WUFP Phone fieldI am trying to capture the phone number of guests that submit a form on my woocommerce website using the advancedwoocommerce custom field for phone no custom field plugin. I noticed ...
Titus's user avatar
  • 1
0 votes
2 answers
31 views

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field. I have an ACF User field (allowed_users)that author's can multiple select when they ...
Pete's user avatar
  • 998
0 votes
1 answer
193 views

Advanced Custom Fields Custom Post Types Heirarchy

I am seeking some help with Custom Post Types using Advanced Custom Fields Pro. I have created a Custom Post Type (headphones) and enabled "Hierarchical" as explained here: https://www....
Bec's user avatar
  • 3
0 votes
1 answer
44 views

Wordpress custom post type -> query and sort by custom field with multiple values, then published date

I have a custom post type with 2 custom fields that I am trying to sort by: The first custom field is "featured post" (yes or no values). The second custom field is "CPT images ...
Mitch S's user avatar
  • 27
0 votes
0 answers
27 views

add class to woocommerce single product template gallery thumbnails if media attachment ACF field toggled (true/false)

i have the following custom field (quick_ship): i've added this in functions but not working at the moment: <?php $image = get_field('quick_ship'); $size = 'full'; // (thumbnail, medium, ...
vulgarbulgar's user avatar
0 votes
0 answers
13 views

Include custom post type that matches taxonomy field in another custom post type

I have two custom post types, one is “maker” and the other “product”. (used ACF plugin) I have a taxonomy field for Business Name, this field is called “choose_business” in the product custom post ...
Nik Nak Sim's user avatar
0 votes
1 answer
22 views

Wordpress duplicating posts from single loop

I've created a custom post type with ACF custom fields included. The CPT is being placed inside of a bootstrap slider. Everything seems to be working, except, the posts being rendered on the page are ...
Mitch S's user avatar
  • 27
0 votes
0 answers
33 views

Use Custom Field to Display Post Loop

In my custom template I have created a menu which is a row of 10 horizontal tabs. Each tab shows a date which is defined using an ACF datepicker field in the post. I have also created a custom post ...
SavPhill's user avatar
  • 118
1 vote
1 answer
75 views

Using add_meta_box on a page with file upload and importing fields

This must be fairly simple :) I'm trying to import data into ACF repeater fields and am mostly following the answer to Add special meta box to custom post type But what I have below isn't saving the ...
BlueDogRanch's user avatar
0 votes
1 answer
99 views

Uploading images via ACF update_field function

I am trying to update image fields within a group in ACF via the update_field function I am successfully adding the images to the media gallery but I am having trouble getting them added to each ACF ...
grzybowski1911's user avatar
0 votes
0 answers
15 views

Alter main query to always list posts according to ACF number field

Is it possible to do this for all places the main query appears? I don't want to make any other modifications - simply just change the order of the main query. Tried this without success: function ...
Jules's user avatar
  • 83
0 votes
1 answer
26 views

Custom fields disappearing when a custom post type is assigned

I have a custom taxonomy page. This custom taxonomy has a few custom fields to populate it's template. A user is able to assign custom post types and media to this custom taxonomy and then those posts ...
solariati's user avatar
0 votes
0 answers
80 views

Show an ACF gallery in a lightbox with thumbnails nav

I used "Foobox" plugin to show a ACF gallery (hidden) start from a single image. Here is the code used if ( have_rows( 'lsv_prodotto' ) ) { while ( have_rows( 'lsv_prodotto' ) ) { ...
Claudio Mattioni's user avatar
0 votes
0 answers
86 views

Issue with Date Picker Field Type

While working on a project, I encountered an issue related to the date picker field type. Specifically, I am creating a custom field for date selection using a date picker. However, upon selecting a ...
Abhijeet Kumar's user avatar
0 votes
0 answers
114 views

Sort posts by category and date using php and custom query

I am using Elementor Pro and Advanced Queries and also ACF for custom date. I have 2 types of posts that are events - event 1 and event 2. I have an event calendar on the first page showcasing the ...
Tryandcry's user avatar
0 votes
0 answers
34 views

Add css class ID to largest and smallest number a custom field in wp_query

I have a wp_query for get a ACF number field. I want to add a css class ID to the largest and smallest number in the loop. <ul> <?php $editor = new WP_Query( array( '...
och's user avatar
  • 29
0 votes
1 answer
441 views

Advanced Custom Fields (ACF) and their Javascript API

I have some jquery javascript in the frontend that is helping me display a map. I want to query my custom post type "mountains" basis an "id" of, say, 106. I can do this ok with ...
spreaderman's user avatar
0 votes
0 answers
43 views

ACF block notice error block type is already registered - Showing error for all the block types

I am using Advanced Custom Fields PRO 6.0.6 version and when I enable debug option to true to fix the debug errors. I am facing error with ACF as shown below : Any help would be much appreciated. ...
imlokeshs's user avatar
0 votes
1 answer
54 views

Getting index of a custom ACF block with PHP?

I have created a custom block using Advanced Custom Fields. The blocks will have an alternating layout for even/odd blocks. I want to set this up automatically, rather than adding style options or ...
Gutengerd's user avatar
0 votes
2 answers
74 views

ACF - How to get custom taxonomy term image field

I have loop that displays only the direct children of a term on a taxonomy page. I also have image field, attached to custom taxonomy. Now, I want to display image in my page template: <?php $...
och's user avatar
  • 29
0 votes
1 answer
197 views

How to automatically update ACF field value every year?

I'm using ACF in my custom post type and I have 2 numeric fields: one for Birth year and another for Age. I want to update the age field automatically based on the birth year field value. I found out ...
Adriana Leites's user avatar
1 vote
2 answers
778 views

WordPress - Custom permalinks for advanced custom fields (ACF) using post type taxonomy

I am trying to update the URL structure for posts within a custom post type. I would like the url to use the taxonomy slug from the "resource-topic" taxonomy, and not the custom post type ...
user2748363's user avatar
0 votes
2 answers
69 views

create custom post type and populate custom fields using php

I am trying to programatically create posts of a certain custom-post-type. Within the custom post type i've enabled 'show in rest api' and set a slug. Within ACF i've setup a group that contains ...
RkdL's user avatar
  • 1
0 votes
2 answers
112 views

"acf/load_field" Critical error upon saving/updating WooCommerce products [closed]

I'm trying to prepopulate an ACF field called "upcoming_class_date" using "acf/load_field" but my code snippet returns a critical error upon saving/updating a product in ...
GrumpyCat000's user avatar
0 votes
1 answer
230 views

Using have_rows() with nested acf fields [closed]

I have a question about nested acf fields. I can't figure out a great way to use have_rows() when a repeater/flexible content is nested within another field. Normally, I would access the data like ...
Jillian Hoenig's user avatar
0 votes
1 answer
141 views

displaying ACF Repeater Fields in Backend sorted by a subfield

I'm facing a challenge :-) The goal: displaying ACF Repeater Fields sorted by a subfield in the backend. In the frontend, the fields are sorted using PHP, but I also want to have the same view in the ...
Aprilia Parrino's user avatar
0 votes
0 answers
7 views

WP_query 'orderby' with array and if first variable value missing then put last and only sort that by the second variable

Some of my Custom Post Type (CPT) 'player' has a value entered for ACF field 'player_personal_player_number', some 'players' do not have a number. Trying to display the 'players' by number (ASC) first ...
piet's user avatar
  • 111
0 votes
0 answers
27 views

IF Statement to check if the link_title == then display this code

I am working on a section which uses ACF and each service has it owns colour (for background of an icon etc). This has been setup in Theme Options and I am trying to run an IF statement which checks ...
Barry Hughes's user avatar
0 votes
1 answer
329 views

Get the featured image of an ACF relationship field

I have an Advanced Custom Fields field group with ID group_61318c077c7d6. I've made this field group visible for Block = 'slider'. In that field group is a field with ID field_61318c078a746, a ...
Steve's user avatar
  • 1,677
0 votes
0 answers
68 views

How to set default value for fields added to user profile using ACF

I am adding several fields to the user profiles using ACF, example field setup with location set as user profile: ... array( 'key' => 'field_user_created_id', 'label' => '...
Rain Man's user avatar
  • 145
0 votes
1 answer
63 views

Section disappears when update pushed to production

I have a question about an issue I've been struggling with. If anyone has any ideas - let me know! I added a "Theme" select field (with advanced custom fields), to allow the client to choose ...
Jillian Hoenig's user avatar
0 votes
0 answers
54 views

How do I add an ACF shortcode to a non-ACF page?

I'm going round in circles with this one, so need some help please. I've setup a basic ACF group for Event type page using Date, Location, a link and description. I have these fields located to any ...
Burns's user avatar
  • 3
0 votes
1 answer
104 views

Convert acf/gutenberg markup to html

I am setting up a json feed with content of some of my pages. My problem is that I use ACF and Gutenberg, so get_the_content() returns the ACF markup which is basically a HTML comment with json. Is ...
user2969934's user avatar
0 votes
1 answer
143 views

$attributes not defined in block.json PHP template for ACF blocks

I'm using ACF blocks to create custom dynamic blocks. Here is the code in the block.json file - { "title": "Full Banner", "name": "lionsroar/full-banner"...
Divjot Singh's user avatar
0 votes
0 answers
47 views

How can I display custom post type grouped by a "select" cutom field value?

I have a custom post type. I use ACF for the layout of this custom post type. In ACF, the field is called "temoignage_category", the field type is a "select" and in the "...
blogob's user avatar
  • 137
0 votes
1 answer
41 views

ACF number less than comparison not working

I have two ACF fields named as “price” and “reduced_price” now i have another field named as “price_filter” which should be filled with following conditions, If “price” is greater than “reduced_price”...
Shaharyar Afzal's user avatar
0 votes
0 answers
19 views

Pending posts showing category until published

I have used ACF Pro to setup post types Award "Categories" and "Nominees" -- Award is being assigned to the post but while it’s pending it's not showing up here https://a.cl.ly/...
Daniel Finch's user avatar
0 votes
0 answers
134 views

Search and Filter Using Custom Post Type, Custom Taxonomy, and Advanced Custom Fields

I have a site, linked here, which was previously created in another cms, but is being moved to Wordpress. I am seeking some guidance on moving one of the more complex features over to Wordpress. ...
brodobaggins34's user avatar

1
2 3 4 5
30