I understand what is not working.
ACF is not compatible with WP 5.3.2
When I go to add a rule it doesn’t save and doesn’t add anything and gives me an error:
Uncaught TypeError: Cannot read property 'attr' of undefined
at Object.i.duplicate (acf-input.min.js?ver=5.8.7:1)
at acf.Model.addGroup (acf-field-group.min.js?ver=5.8.7:1)
at acf.Model.onClickAddGroup (acf-field-group.min.js?ver=5.8.7:1)
at acf.Model.<anonymous> (acf-input.min.js?ver=5.8.7:1)
at HTMLAnchorElement.d (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-resizable&ver=5.3.2:2)
at HTMLDivElement.dispatch (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-resizable&ver=5.3.2:3)
at HTMLDivElement.r.handle (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-resizable&ver=5.3.2:3)
There are no other plugins on the site
Excuse me, but I am also quite confused.
I created a taxonomy, this taxonomy is seen within the pages that I am going to create.
For example, I created a page called “Test front” and the desire for taxonomy I put “front”.
Then in ACF I created “Test field” which inside a text type “Case text” value. As a rule I put “Page is equal to test front”. As a code I put what I put in the first few answers.
When I go to the “test front” page and in the field created with ACF “Case text”, I enter some text, the text is not saved and is not displayed in the front end.
At this point I can’t understand where I’m wrong, I reread the guides and I can’t understand
In ACF I created Test Field and the rule is
Show this Field Group if:
Page is the same as Test Front
I will try to be as detailed as possible Thanks
1. I am using Local on a mac book pro, and I am developing a basic theme.
2. I installed both ACF and CPT UI and no other plugins
3. I created a taxonomy called home_visibility in CPT UI
4. Later in ACF I created Test Fild with text value
5. I created a page and put “about” as a taxonomy.
6. Then I went to my front-page.php and put this code
<!-- About -->
<?php
$vinosofuture_args = array(
'post_type' => 'page',
'tax_query' => array(
array(
'taxonomy' => 'home_visibility',
'field' => 'slug',
'terms' => 'about',
),
),
);
$query = new WP_Query( $vinosofuture_args );
//The query
$vinosofuture_the_query = new WP_Query( $vinosofuture_args );
//The Loop
while ( $vinosofuture_the_query->have_posts() ) :
$vinosofuture_the_query->the_post(); ?>
<section>
<div class="container">
<div class="row">
<div class="quote-comment col-md-6 align-self-center section-padding ">
<p><span class="comment-apexes"><i class="fas fa-quote-left"></i></span> <?php ?></p>
<p class="autor-text"> <span class="text-bg-blue"><?php the_title(); ?></span> <?php the_field('about_quote_cognome'); ?></p>
</div>
<div class="are-title col-md-6 section-padding">
<p> <?php the_field('testo') ?> </p>
<div class="">
<span><img class="line-work-width" src="img/divide-creative.svg" alt=""></span>
</div>
<p>
<span class="firstcharacter">L</span> <?php the_content(); ?></p>
<button type="button" class="btnabout btn-about">Learn More</button>
</div>
</div>
</div>
</section>
<!-- /About -->
<?php endwhile;
// Ripristina Query & Post Data originali
wp_reset_query();
wp_reset_postdata(); ?>
Thx
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.