Remove Content Filter

As the filter occurs within a class you must remove it by replacing $this (as you don’t run the remove_filter on the class, $this is not available) with the name of the class where it is declared. An example with a class called : Wecba, you will remove it like this : remove_filter(‘the_content’, array(‘Wecba’, ‘add_Content_Ads’), … Read more

How to access plugin variables from theme templates without using globals?

Using add_filter will automatically pass $errors to your callback function: add_filter(‘form_errors’, ‘return_errors’); function return_errors($errors) { // validate $errors based on form conditions return $errors; } If the filter has more than one variable passed you can access that extra information by adding a filter priority and specifying the number of arguments to pass to the … Read more

Add content as soon starts

As every theme is different you can’t really expect a plugin to know where to put the slideshow in. As you say the best place would be the content filter if that’s where you want it. If you want it anywhere else you could inject it after using jquery?

Admin filter for product SKU?

I used a plugin “WooCommerce Filter Orders by Product” and modified their search by ID, added a get_post_meta(), and now have the ability to filter products by ID. Plugin: https://en-ca.wordpress.org/plugins/woocommerce-filter-orders-by-product/ Modified code: // Display dropdown function foa_product_filter_in_order(){ global $typenow, $wpdb; if ( ‘shop_order’ != $typenow ) { return; } $sql=”SELECT ID,post_title FROM $wpdb->posts WHERE post_type=”product” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)