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

ACF: Only get first row of a Repeater Field

I have a repeater filed called "images" and inside it I have a sub_filed called "image". How can I get only the first row value? Here is my code <?php if( have_rows('images') ): ...
0
votes
0answers
19 views

Set Post Private if no linked Post Objects (ACF)

I have created 2 custom post types (using CPT UI). Parent and children. Many children can be associated to one parent using a post object field(add_to_parent). I would like the parent post type to be ...
0
votes
0answers
13 views

Show in an entry a Custom Post Type associated to a post

This is the information of my problem: Technologies used: Divi Theme - WordPress Scope: Show an Advanced Custom Field of type post_object related to a specific post. Details: I have a custom post ...
-1
votes
0answers
13 views

Automaticly delete post by ACF Field

Hy there, I do have a custom post with some ACF Fields. One field is called "ji_objektstatus" an has an aktiv (active) state or inaktiv. is it possible do automaticly delete posts withe the ...
0
votes
0answers
9 views

Add a Call to Action Button to Wordpress Post Thumbnail

I would like to add a call to action button directly beneath the Post Thumbnail on the single post, using Advanced Custom Fields data, using either an action or a filter (not sure which would be most ...
0
votes
0answers
10 views

How to get a product's Custom Fields in a different template file?

so I have some Advanced Custom Fields on my product page. They are displayed in the shop loop, like so: add_action('woocommerce_after_shop_loop_item_title', 'tagline', 5); function tagline() { ...
1
vote
0answers
43 views

How to do a WP_Query when a post has a relationship to anoter post via an ACF Post Object field, where the related post is in a certain category?

I have custom post type A, and B. B has a relationship back to A via an ACF Post Object field. A has (custom) taxonomies that B does not. How do you get all B where A is in taxonomy X. I imagine how ...
0
votes
0answers
11 views

how create ACF static field

my configuration:- I have 2 CPT - Invoice and Order tickets and one page - Inventory with only one acf field - Woods and one acf field - Woods (Number Field, Location - Invoice, Order tickets, and One ...
1
vote
1answer
31 views

Trouble With Conditional Logic in PHP

I have created an advanced custom field that allows editors to add an image and title to be displayed in a Bootstrap 3 carousel. I am having trouble with the conditional logic for the image field. The ...
1
vote
0answers
37 views

How to add a post slug to a url?

For a project i'm working on I try to add the slug of a custom post type to the end of an url. The case: When a user fills out a contact form, the email that gets send needs to have a link to the ...
0
votes
0answers
22 views

ACF: Display Google Map in frontend issues

I have a CTP with an ACF Google Map field. The values in this field come from somewhere external via APIs. I set the API right because in backend I see correctly longitude, latitude and address and ...
0
votes
0answers
67 views

Call external API based on user input

I want to create a WordPress website in which I want to display a search box on a page, where the user will be able to search for tracking numbers from different companies. On searching a string in ...
0
votes
1answer
6 views

Orderby custom fields is not working

This code is to order by ACF fields in admin page. It actually filter by custom field but not ordering it. the data inside the fields is string and not numeric, so i think orderby meta_value is ...
1
vote
1answer
30 views

set_query_params using custom params defined in functions file?

I am using the Advanced Custom Fields and ACF to REST API plugins. In my functions file I have specified custom query parameters to filter my custom post type by ACF fields in my REST request: ...
1
vote
0answers
24 views

Auto populate excerpt field from acf date field

I search a way to auto populate excerpt field from ACF with date field. Somebody can help me?
0
votes
1answer
20 views

Bootstrap 4 Carosuel with ACF Repeater field

Given this HTML code, how can I create a dynamic Carosuel with thumbnails using Bootstrap 4 that can be updated in back-end using ACF Repeater? My Repeater field is called carousel_repeater and inside ...
0
votes
0answers
15 views

ACF: display custom filed of CPT into the loop

I have a CPT called Project (Projects in plural) and I am displaying it in the loop into a column. I would like to display a custom field I have into this CPT (called "type") underneath the ...
1
vote
0answers
15 views

Explore custom posts (CPT UI & ACF) database from WP UI

How can I explore the custom posts I defined with CPT Ui and ACF? I created a custom post called "book" to actually store books and I would like to explore the database to see the number of ...
0
votes
0answers
14 views

Custom post ID & display information related to this ID

I'm new to Wordpress and I want users to be able to retrieve a post by its ID. For that I will be using a form in the homepage asking an ID and submitting the form will redirect user to the post's URL....
0
votes
0answers
19 views

Query post by ACF User field

Hello I created a post type with ACF User field (multiple select). The idea is only the selected users will be able to see the post. Current users will only see the posts assigned to them. But my ...
0
votes
0answers
18 views

How to get Relationship Field dual-column showing IDs instead of post titles in ACF plugin?

by default, in the ACF plugin, the relationship field allows the user to choose a relation with another post in the default dual column view. In my case, I am using the Relationship field in order to ...
0
votes
1answer
17 views

ACF Taxonomy in Loop

How are you? My problem is the following on my front page I'm displaying some cards, for example name and description, this information is from my taxonomy called event because I created some fields ...
1
vote
0answers
20 views

How can I display a custom field from all posts and order them individually from their parent post

I have a post_type of 'interview' and within it is a repeater field 'interview' and sub_fields 'question' and 'answer'. I would like to display all questions and answers from all interviews and ...
0
votes
0answers
18 views

ACF — AJAX populate Gallery field with a Post select

I have a post type with two fields: a Post select and a Gallery. On Post select change, I’m getting the image IDs from several fields in that post and attempting to attach them to the Gallery field. I’...
0
votes
0answers
7 views

Menu Item custom radio button field show results based on value (Advanced custom field plugin)

I have a custom field (radio button) for all menu items for a menu just as follows. https://i.ibb.co/0Fyxnn3/1.png this field is mainly there to users to define a whether a menu item is a mega menu or ...
0
votes
0answers
13 views

Save ACF relationship (name) value to ACF text field

I try to achieve the following. I have two post types, "projects" & "kuenstlerinnen" (artists) Within the post type "projects", there's an ACF relationship field ...
0
votes
0answers
23 views

Custom ACF block only outputs commented JSON to the DOM

I created several custom ACF blocks and all but one are working properly. This one in particular only outputs commented out JSON to the DOM. Here's what it's displaying (with a few string values ...
1
vote
0answers
24 views

ACF Relationship Previous Next links of CPT

I have a CPT for artworks with custom taxonomy for artists. Then I have another CPT for artists. The artist pages are basically the the page title (artist name) and a relationship field where you add ...
0
votes
0answers
18 views

Multisite - Cloning CPT pages + content (including ACF Flexible Content) from site to site

I wondered if anyone had any WordPress Multisite knowledge where I need to be able to move pages and content from one site to another? A little bit of background, I've done this previously using the '...
0
votes
0answers
18 views

add custom button in archive page after every post excerpt?

I want to add custom button in archive page .add custom button in archive page after every post excerpt Reference https://ibb.co/h15xHZ8
0
votes
1answer
49 views

WPQuery Date and ACF

I'm creating a Query, and i need to filter by an ACF date field. In the database the value (in wp_post_meta table) is like this : MM/DD/YYYY I have few rooms with, as a value in the field ...
1
vote
0answers
16 views

ACF custom block get_field() shows null on front-end? [closed]

I built a custom block using ACF acf_register_block_type(); function it works fine in the WordPress dashboard (block editor), it shows the field data and all good.. but in the front-end (view page) ...
0
votes
0answers
28 views

How to set WordPress timezone in functions.php?

I'm making an ACF options page and trying to add a timezone setting there, so I don't need to expose the actual WordPress settings page to user. I've been trying to find a function to change the ...
0
votes
0answers
11 views

Add Category After Date From ACF Date Picker Field Has Expired

Need to add category to custom post type entries after a date from an acf date picker field has passed. I found the following code which almost does the same thing. The difference is that it sets the ...
1
vote
1answer
44 views

Add custom ID to CPT posts only create not update

I'm trying to autofill a custom field only when the post is created and not when it is updated. CPT "valoraciones" ACF custom fields "ID_valoraciones". The ID_valoraciones is an ...
0
votes
0answers
13 views

How to use bootstrap elements in single post template

can we use bootstrap elements -https://www.bootdey.com/snippets/view/Product-comparison or any bootstrap elements in single post template in wordpress and then make it dynamic? if possible can anyone ...
0
votes
1answer
26 views

Echo ACF taxonomy field within a foreach for another taxonomy

I am echoing thumbnails for a list of items within a 'Show' custom taxonomy. Within this taxonomy I have additional fields via Advanced Custom Fields / ACF: 'podcast_category_thumb' = image field '...
0
votes
1answer
22 views

Using ACF values in nested WP queries for CPT with date values in the past

I'm using a pair of ACF date fields to create a query on a custom post type (event). I have a "Past Events" feed which is ignoring my usual technique for creating the following behaviour: ...
1
vote
0answers
14 views

How to add additional field [closed]

If a user want to add. For example I have 3 fields (Brother Name, Marital Status, Occupation) . There should be a button + or – , when click the same 3 fields (Brother Name, Marital Status, Occupation)...
0
votes
0answers
18 views

Initializing the cropper for image uploads

I'm using wordpress with the ACF plugin. For a customizable template header I'm using amongst other fields an image field where the user can select the background image of the header. The image needs ...
0
votes
0answers
22 views

ACF update fields [duplicate]

I have created a field with Advanced Custom Fields that is a number field to be used as a counter. In functions.php i have created my shortcode function, and has this part: <a href="https://...
0
votes
2answers
49 views

how to load random related posts with specific custom fields?

I want to load 3 posts that have the same custom field value as the current post. for example: The current post has 3 custom fields: color: black background: red lastname: doe Now I want to load ...
0
votes
0answers
14 views

search form for custom fields

I want to create a custom search for pin code search with custom fields value. When exact match with pin code will show the post data Can you please help me? Any help in this matter would be ...
1
vote
0answers
21 views

How to add Advenced Custom Fields In Single Post

I Need Help, I add ACF code in single post download button showing but in link of download button same of link post, I add other website and link in button download always same, what's wrong in my ...
0
votes
1answer
35 views

HTML Special Characters in URL string [closed]

I am using this code to convert the & to its html entity but it doesn't work. The output is passed to a field in gravity forms. <a href="/enquiry/?event=<?php $urlst=get_field('fl_name')...
0
votes
0answers
34 views

How can I show ACF repeater first row and column post object only as a dropdown list upon select

I have created a repeater field using ACF and inside two post-object field where post type only pages and (parent page) First one multiple select None (sub page) Second one multiple select yes I ...
1
vote
0answers
35 views

ACF: Update field values and save to database [closed]

I'm looking to update ACF custom field values on the database. The furthest I've got is to load the values in but I need to then update the posts manually for them to save to the database. add_filter('...
0
votes
0answers
90 views

Excluding posts from search results page with meta query not working

On my search results page I have two loops. First loop displays post by meta value and second loop is "regular" loop that display posts by search query: <section> <div class=&...
0
votes
0answers
51 views

pre_get_posts hook not targeting search results page query

I'm trying to target search result page query with this code: function my_custom_search_query( $query ) { if ( ! is_admin() && $query->is_search && $query->is_main_query() ) ...
0
votes
0answers
17 views

Custom hook after user successfully verifies email

Can anyone help me creating a function that I could use for the following scenario: Basically I am trying to create a register form that has a hidden custom field with value of a post ID and store it ...

1
2 3 4 5
28