Child theme remove parent filter in functions
In child theme’s functions.php <?php remove_filter(‘comment_form_field_comment’,99,1); ?>
In child theme’s functions.php <?php remove_filter(‘comment_form_field_comment’,99,1); ?>
Wildcard 301 Redirect Using Theme Function
Why does echo on functions.php not yield result in source code?
If you’re using global loop for displaying the posts, then you can easily modify which posts are shown using pre_get_posts action. function restrict_categories_for_user( $query ) { if ( ! is_admin() && $query->is_main_query() && get_current_user_id() ) { $user = wp_get_current_user(); if ( in_array( ‘viewer_a’, (array) $user->roles ) ) { // The user has the “viewer_a” role … Read more
Comparing your code to the WordPress function wp_schedule_single_event, it appears you failed to indicate that parameters would be passed. Perhaps the following version of your code will work for you. add_action( ‘crondelete’, ‘delete_page_in’,10,1); wp_schedule_single_event($seconds, ‘crondelete’, array($new_post_id )); Notice the add_action now includes two extra parameters: 10=Priority, and 1=Accepted Arguments to be passed.
This code will only search form woocommerce products. If you want to show any other search result from another post type you can do by simply change post type slug ‘product’ with you own post type slug add_action( ‘pre_get_posts’, ‘wpse223576_search_woocommerce_only’ ); function wpse223576_search_woocommerce_only( $query ) { if( ! is_admin() && is_search() && $query->is_main_query() ) { … Read more
The error occurs probably because you don’t check for the post type when overriding the post clauses. Your filter callback needs a second parameter which is a WP_Query instance, and then use it to check if the post_type is what you need. If you don’t check for that, you’ll be overriding every single database query … Read more
If nothing has been placed into your shortcode “wpv-current-user”, you won’t see anything in any of your output. You should use the built-in function wp_get_current_user() for this. Just beware that the Codex page warning. This may need to be called within an action that fires with or after the ‘init’ hook. I have modified your … Read more
i found the solution im sorry its my bad my shop based on variable produts, after i call variation price it worked!
Try this it works for me. Place this code in your theme functions.php file. function dynamic_product_category_widget($title, $widet_instance, $widget_id) { if ( $widget_id !== ‘woocommerce_product_categories’ ) return $title; if ( is_product_category() ) { $cat_title = single_cat_title(‘<p class=”widget-title footer-widget”>’, ‘</p>’); return $cat_title; } elseif ( is_product() ) { $cat = get_the_terms( $product->ID, ‘product_cat’ ); foreach ($cat as … Read more