I cant find the custom html block in wordpress. Does it not automatically come with a custom html block or do I have to create my own? I look for it in the search but it doesnt come up. I will click to add a block and then ill type 'html' or 'custom' and the block doesnt come up. Is there a way I can add this block? I need it for iframes. The plugins i have installed do not work. Has anyone else come across this issue? Is it possibly disabled?

  • 1
    It does come with WP Core, so you might try a different theme or deactivating plugins to find out what is disabling it. It's also possible that you don't have the right permissions - check that you're a default Administrator role and not something custom.
    – WebElaine
    Apr 20, 2022 at 16:14

1 Answer 1


Welcome on StackOverFlow.

This block is the legacy custom HTML and as far I know, it's hidden but you

add_filter( 'widget_types_to_hide_from_legacy_widget_block','sof_hide_legacy' );
function sof_hide_legacy( $widget_id ){
    $widget_to_show = array( 'custom_html' );
    $widget_id = array_diff( $widget_id, $widget_to_show );

    return $widget_id;

Does this help you ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.