• Is there a way I can unhide the custom html widget on the drop down of the legacy block widget?

    I want to use some widgets as legacy widgets and some others as block widgets. But i have noticed most of them are hidden. I can only add: meta, navigation menu and language switcher (polylang).

    • This topic was modified 1 year, 9 months ago by ceruleanpiglet.
    • This topic was modified 1 year, 9 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ceruleanpiglet

    (@ceruleanpiglet)

    Sorry for the terrible misspelling on the title.

    I wanted to write “unhide” but I can’t find a way to edit the title and fix it.

    Thread Starter ceruleanpiglet

    (@ceruleanpiglet)

    I write the solution here for future reference.

    If any expert feels it is a horrible one please let me know.

    
    function unhide_widget( $widget_types ) {	
      array_splice($widget_types, array_search('custom_html', $widget_types), 1);
      return $widget_types;
    }
    
    add_filter( 'widget_types_to_hide_from_legacy_widget_block', unhide_widget' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unhide custom html widget to legacy widget block combobox’ is closed to new replies.