advanced-custom-fields

how to save acf_form using ajax without page refresh

核能气质少年 提交于 2021-02-16 13:11:08
问题 I have theese three acf_form. I want to show these form one by one as well as I want to save every form on button click through ajax without page refresh. Right now it's refreshing page whenever I update. I will show through display none & block using js. <div class="SetupNew"> <h2>Setup Deals To Attract New Clientele</h2> <p>Example: buy $15 get $30 for services</p> <a href="javascript:void(0)"><p id="newDealsTxt">[Click Here To Setup] </p></a></div> <?php acf_form($args = array( 'post_id' =

how to save acf_form using ajax without page refresh

血红的双手。 提交于 2021-02-16 13:09:34
问题 I have theese three acf_form. I want to show these form one by one as well as I want to save every form on button click through ajax without page refresh. Right now it's refreshing page whenever I update. I will show through display none & block using js. <div class="SetupNew"> <h2>Setup Deals To Attract New Clientele</h2> <p>Example: buy $15 get $30 for services</p> <a href="javascript:void(0)"><p id="newDealsTxt">[Click Here To Setup] </p></a></div> <?php acf_form($args = array( 'post_id' =

WooCommerce Display avanced custom fields (ACF) inside order notification

為{幸葍}努か 提交于 2021-02-11 16:12:51
问题 I've added the following snippet to display a custom field (that don't display taxonomy field if product has field) with the estimated delivery time. This is working. <?php add_action( 'woocommerce_before_add_to_cart_form', 'geschatte_levertijd', 10 ); function geschatte_levertijd (){ if( get_field('plevertijd') ): ?> <span class="product_melding_kleur"><i class="fa fa-truck"></i>Levertijd: <a href="/verzending-en-levertijd/" alt="Verzending en levertijd" ><?php the_field( 'plevertijd' ); ?><

WooCommerce Display avanced custom fields (ACF) inside order notification

你说的曾经没有我的故事 提交于 2021-02-11 16:12:49
问题 I've added the following snippet to display a custom field (that don't display taxonomy field if product has field) with the estimated delivery time. This is working. <?php add_action( 'woocommerce_before_add_to_cart_form', 'geschatte_levertijd', 10 ); function geschatte_levertijd (){ if( get_field('plevertijd') ): ?> <span class="product_melding_kleur"><i class="fa fa-truck"></i>Levertijd: <a href="/verzending-en-levertijd/" alt="Verzending en levertijd" ><?php the_field( 'plevertijd' ); ?><

Wordpress: How to make unique field with ACF and custom post type

牧云@^-^@ 提交于 2021-02-11 01:59:17
问题 So I'm working on a custom post type to work together with Advanced custom fields. And I have this little script that is supposed to block duplicate emails from being entered. But the script does not work as I want it to. The code that u see below is for the custom post type page that I've linked to ACF. function init_members() { $labels = array( 'name' => 'Members', 'singular_name' => 'Member', 'menu_name' => 'Members', 'name_admin_bar' => 'Member', 'add_new' => 'New member', 'add_new_item'

Wordpress: How to make unique field with ACF and custom post type

会有一股神秘感。 提交于 2021-02-11 01:57:54
问题 So I'm working on a custom post type to work together with Advanced custom fields. And I have this little script that is supposed to block duplicate emails from being entered. But the script does not work as I want it to. The code that u see below is for the custom post type page that I've linked to ACF. function init_members() { $labels = array( 'name' => 'Members', 'singular_name' => 'Member', 'menu_name' => 'Members', 'name_admin_bar' => 'Member', 'add_new' => 'New member', 'add_new_item'

Correct Way to Output ACF Generated Values Using WP_Query() and Foreach()

风流意气都作罢 提交于 2021-02-08 08:56:34
问题 I have setup fields and sub-fields using Advanced Custom Fields (ACF). The structure is similar to: Field: Pet Details - Sub-Field: Pet Name (text) - Sub-Field: Pet Birthday (date picker) - Sub-Field: Pet Gender (taxonomy, select) - Additional... I have been able to use these within my custom post type (/cpt_slug/post_title) using the get_field() , get_sub_field() functions, however I have not been able to usilise the default ACF functions ( get_field() , get_sub_field() , etc ) in

Update ACF fields inside layout via WP API

喜欢而已 提交于 2021-02-07 10:23:59
问题 I am trying to update a custom field via the WordPress API. The custom field is within an Advanced Custom Fields repeating layout and I cannot figure out how to update it. I have authentication set up and can update a post status, but I'm not having any luck in updating the ACF data. Using Postman : Page status can be updated with http://localhost:9000/wp-json/wp/v2/pages/4564/?status=public . Is there a similar value which can be used to update the ACF field or a way to update by passing

Update ACF fields inside layout via WP API

会有一股神秘感。 提交于 2021-02-07 10:22:37
问题 I am trying to update a custom field via the WordPress API. The custom field is within an Advanced Custom Fields repeating layout and I cannot figure out how to update it. I have authentication set up and can update a post status, but I'm not having any luck in updating the ACF data. Using Postman : Page status can be updated with http://localhost:9000/wp-json/wp/v2/pages/4564/?status=public . Is there a similar value which can be used to update the ACF field or a way to update by passing

ACF select2 stop popping out the keyboard on select

风格不统一 提交于 2021-02-05 09:26:08
问题 I am using the latest version of acf pro, I am using select2 dropdown lists with a search-input, on mobile I would like them to stop pulling out the keyboard when the dropdown list is open, the logical behavior is to open > browse the list> otherwise tap search-input. I tried to solve the problem without success. [ I give you all the necessary information wp-content/plugins/advanced-custom-fields-pro/assets/inc/select2/4/select2.min.css?ver=4.0 Html of dropdown <span class="select2 select2