Custom Image Widget

There seems to be no official hooks that effect media widgets. It is possible to access the properties of the widgets in the sidebar using the dynamic_sidebar_params hook in combination the $wp_registered_widgets global widget array. However, there is no image widget property for setting the inline styling of the image. Therefore the simplest solution to … Read more

Add filter for specific category only

Went about it a different way, works OK. Just in case anyone else is looking for similar functionality; //* dropdown add_filter( ‘woocommerce_product_categories_widget_dropdown_args’, ‘woo_product_cat_widget_args’ ); //* list add_filter( ‘woocommerce_product_categories_widget_args’, ‘woo_product_cat_widget_args’ ); function woo_product_cat_widget_args( $cat_args ) { if ( is_product_category( ‘experiences’ ) || term_is_ancestor_of( 2921, get_queried_object_id(), ‘product_cat’ ) ) { $cat_args[‘exclude’] = array(2548, 2245, 2775, 2913, 2846); … Read more