wordpress

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'

wordpress: add custom meta-box to pages overview not only to posts/pages?

不问归期 提交于 2021-02-11 01:16:54
问题 I know how to add meta boxes to pages/posts/custom_post_type ($post_type) pages: $screens = array( 'post', 'page' ); foreach ( $screens as $screen ) { add_meta_box( 'myplugin_sectionid', __( 'My Post Section Title', 'myplugin_textdomain' ), 'myplugin_meta_box_callback', $screen ); } but how do i add a meta box to the pages-overview? i need a link-list there to some special pages ... I know there are plugins who can do this: http://wordpress.org/plugins/meta-box/screenshots/ but only on posts

wordpress: add custom meta-box to pages overview not only to posts/pages?

天涯浪子 提交于 2021-02-11 01:16:19
问题 I know how to add meta boxes to pages/posts/custom_post_type ($post_type) pages: $screens = array( 'post', 'page' ); foreach ( $screens as $screen ) { add_meta_box( 'myplugin_sectionid', __( 'My Post Section Title', 'myplugin_textdomain' ), 'myplugin_meta_box_callback', $screen ); } but how do i add a meta box to the pages-overview? i need a link-list there to some special pages ... I know there are plugins who can do this: http://wordpress.org/plugins/meta-box/screenshots/ but only on posts

Display WooCommerce custom product field meta data in Cart and on Checkout

南笙酒味 提交于 2021-02-10 23:39:52
问题 I've created a custom product field (admin). The field works fine and it saves the data just fine. What I am having problems with it is adding the meta data to the cart and checkout. I get no errors (debug turned on in wp-config ), no notices -- nothing. In the cart and on checkout, no data is shown. This is my code: add_action( 'woocommerce_product_options_general_product_data', 'product_delivery_time' ); function product_delivery_time(){ global $woocommerce, $post; echo '<div class="product

@Font-face not working on IOS

爱⌒轻易说出口 提交于 2021-02-10 22:18:01
问题 So I am working on a WordPress website and on each page I have an H1 tag for the title of that page. I am using a special font using @font-face and it works great on windows in every browser, but when I switch over to a mac it won't display the h1 tag its just white space. I have tested this in safari and chrome on multiple mac's and its not working on any of them. If I change the font to let say Arial it works great, if I setup to have a fall back font it does not work. If I change the h1,h2

@Font-face not working on IOS

[亡魂溺海] 提交于 2021-02-10 22:01:54
问题 So I am working on a WordPress website and on each page I have an H1 tag for the title of that page. I am using a special font using @font-face and it works great on windows in every browser, but when I switch over to a mac it won't display the h1 tag its just white space. I have tested this in safari and chrome on multiple mac's and its not working on any of them. If I change the font to let say Arial it works great, if I setup to have a fall back font it does not work. If I change the h1,h2

@Font-face not working on IOS

自闭症网瘾萝莉.ら 提交于 2021-02-10 22:01:47
问题 So I am working on a WordPress website and on each page I have an H1 tag for the title of that page. I am using a special font using @font-face and it works great on windows in every browser, but when I switch over to a mac it won't display the h1 tag its just white space. I have tested this in safari and chrome on multiple mac's and its not working on any of them. If I change the font to let say Arial it works great, if I setup to have a fall back font it does not work. If I change the h1,h2

Setting a tax class based on specific coupon in Woocommerce

杀马特。学长 韩版系。学妹 提交于 2021-02-10 20:52:05
问题 This has been answered a while back but the filter is not working anymore. Not sure if it is deprecated or not. I am using both filters: woocommerce_product_tax_class woocommerce_product_get_tax_class My function looks like: function wc_diff_rate_for_user( $tax_class, $product ) { $tax_class = "Zero rate"; return $tax_class; } add_filter( 'woocommerce_product_tax_class', 'wc_diff_rate_for_user', 1, 2 ); How can I set a tax class based on specific coupon in Woocommerce? 回答1: Since Woocommerce

Custom Layout for Single Product page - Woocommerce

浪尽此生 提交于 2021-02-10 20:49:37
问题 I am trying to create a custom layout for one of our product pages in Woocommerce. I have searched and followed so many tutorials, but none are working for me. I copied 'single-product.php' and placed it into my active child theme in the folder 'woocommerce'. I then duplicated this and renamed it 'single-product-landing.php'. I then placed the following code into my functions.php page: add_filter( 'template_include', 'custom_single_product_template_include', 10 ); function custom_single