add_filter( 'widget_display_callback', 'force_music_header_widget', 10, 3 ); function force_music_header_widget( $instance, $widget, $args ) { // Convert the object into an array to completely remove the arrow symbol $widget_array = (array) $widget; $widget_id = $widget_array['id']; // Check if the widget ID contains or matches 'music' if ( strpos( $widget_id, 'music' ) !== false || $widget_id === 'music' ) { if ( is_category( 'music' ) || ( is_single() && in_category( 'music' ) ) ) { return $instance; } return false; } return $instance; }

    AlmondBistro2

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.