Questions tagged [acfpro]

ACF PRO is the professional version of ACF (Advanced Custom Fields), a plugin for WordPress

ACF is a WordPress plugin for WordPress edit screens and custom field data.

References

341 questions
1
vote
1 answer

get_field() ACF wordpress return null depending on the order I declare Variable

I have two select created using ACF Pro in a custom post type. I made an archive with a wordpress loop to display those element but depending on the order I declare it, my variable it returns : null. Also if I put it before the_title() witch in case…
Beatles BOB
  • 333
  • 1
  • 13
1
vote
1 answer

Escape ACF fields with new lines

I'm using a Text Area field within ACF. I've set the "New Lines" option to "Automatically add paragraphs". Here's how the PHP looks within my template file: Some text.

'; $text = get_field( 'text', 'option' ); if (…
Sam
  • 1,401
  • 3
  • 26
  • 53
1
vote
1 answer

WordPress ACF how to filter a textarea field content

I'm building a WordPress theme that uses the Advanced Custom Fields (ACF plugin). I have the following function via functions.php: function filter_p_tags( $content ) { $content = str_replace( '

','

', $content ); …

1
vote
2 answers

Get product category (Woocommerce) with the taxonomy field (ACF) to filter the loop

Currently, I am working on a website where I have to show posts with the category that is selected with the taxonomy field; I use Advanced Custom Fields for this. With “normal” (single) posts and custom post types, it works like a charm. To show how…
Thomas Tromp
  • 152
  • 9
1
vote
1 answer

ACF pro - frontend form and Wordpress categories while creating post

I try to build page where user can fill the form (using my custom ACF PRO fields) and save it as a post. Then admin need to check it and publish if everything is OK. So far I have form based on custom post type and ACF fields work good so far. But I…
1
vote
0 answers

How to Escape or Sanitize ACF get_field () and the out put of Wysiwyg Editor output?

Can i know how to be Escape proper way ACF(advanced custom filed ) , get_field () option and Wysiwyg Editor output ? is that wp_kses option to be applied? is this statement right?
1
vote
1 answer

Recursively get specific values from three-dimensional array

Solution Thanks to @El_Vanja if ($WPArray[0]['acf']['actor_reels']) { $actor_reels = array_column($WPArray[0]['acf']['actor_reels'], 'actor_reel_category'); foreach ($actor_reels as $actor_reel) { echo $actor_reel[0]; }} Original Question I…
1
vote
1 answer

Elementor custom filter query in custom post type template - How to query field value to filter by?

I have a custom post type which is a sort of profile page for suppliers. On the end of each page, I have a products-widget, which is supposed to show the products of this supplier. All products are assigned to a supplier-specific category. So…
Deuf9912
  • 11
  • 3
1
vote
0 answers

ACF fields are disappear after deployed code from local to development or staging server ( Using Deployer Script )

I am facing the issue, when I deployed the code from local to development server or staging server ACF fields are disappeared on the pages, if I do save the specific field group here ACF Group then the ACF fields are showing on the page ACF Field…
Hims V
  • 310
  • 1
  • 9
1
vote
0 answers

Change ACF Select field Dynamically Based on Repeater Field values for every custom post

I have two a repeater field inside a group field and a select field. What I'm trying to do is get strings from repeater field to select field dynamically for every custom post. I tried ACF codex code but when I try to edit these post type's pages,…
1
vote
1 answer

Probleme shortcode image repeater ACF wordpress with foreach

I have to make a shortcode with acf repeater fields. I have to put the name, function of the person and a picture. The shortcode works for the name and function of the person. But I can't get the image to work here is my code: function…
Thica
  • 17
  • 2
1
vote
0 answers

Automatically setting default settings for ACF PRO on new site install with WP Multisite

I am working on a Wordpress multisite network, where users can register sites on subdomains. I am developing a customized theme for the registered sites using ACF Pro, including use of their 'Options Page' feature, in order to implement…
1
vote
1 answer

Query Posts by Meta Value array count from Relationship field (ACF) on WordPress

I have a relationship field "assigned_brands" on Stylist Post type that returns an array of the associated Brands post type. I want to query based on the count of assigned_brands . For example I want to get only the the Stylists that have between…
1
vote
0 answers

Wordpress - Advanced Custom Field Blocks: Render Preview not triggering on exit

I'm creating an ACF Block which contains a carousel and need to re-initialise the carousel when the user edits the information and returns to the page preview. I currently have: // Block includes import { initUserGroupCarousel } from…
1
vote
3 answers

ACF repeater in taxonomy (category) doesn't work

In a taxonomy category I have: Repeater field named questions. Inside a repeater I have a field named answer. I am trying to show all answers in category.php file like this: $term = get_queried_object(); if ( have_rows( 'questions', $term ) ) { …
Tomasz Muter
  • 141
  • 1
  • 2
  • 7