According to the documentation, you must pass an array of items where you want to enable HTML5 markup:
add_theme_support( 'html5', array(
// Any or all of these.
'comment-list',
'comment-form',
'search-form',
'gallery',
'caption',
) );
The documentation also recommends using add_theme_support() on the after_setup_theme hook, stating that the init hook may be too late for some features.
Reference
Related Posts:
- How to add CSS class to custom logo?
- Editing the custom background CSS
- How to add default images for custom backgrounds?
- Add colors to existing color palette without replacing it
- What flex-width/height does?
- add_theme_support(‘my-custom-feature’)
- add_theme_support( ‘custom-header’ ) does not add option menu in dashboard
- “add_theme_support” for custom footer color?
- Show video as part of the post?
- How to add theme support?
- Edit footer via customizer
- Theme Development: Starter Content after hook
- Can I add multiple arrays within add_theme_support( ‘colors’ )?
- Theme support title tag – how to replace the default WP separator (with a filter)?
- WordPress HTML5 Gallery Support – Convert HTML4 -> HTML5
- add_theme_support( ‘admin-bar’ ) causes fatal error
- What is difference between add_theme_support and Theme Customization API?
- Replaceing _custom_background_cb
- Theme’s featured image option is not showing up
- How can I get page slug
- Add custom classes to anchor in wp_nav_menu
- Upgrade from 5.0.4 to 5.1.1 causes $theme to be null
- Is there a way to set the order of wp_footer hooked functions?
- How to alter the text of the post “Excerpt” box label in WordPress post editor?
- How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]
- How to Auto Approve Comments on a Specific Page?
- How to deploy a new theme/theme options from staging to production site
- How do you enqueue script tags for ReactDOM in WordPress’ functions.php?
- How do I get gallery thumbnail URL and change the default thumbnail size?
- WordPress Errors in generated by theme check plugin [closed]
- Upgrading a custom theme through the Dashboard
- how to make a child theme replace functions in different php files that are loaded throu require_once
- How can I customize wp_footer, where is the code that controls what this function does?
- How WordPress converts URL to $query_string
- More than one meta field in a single meta box?
- how can I remove the sidebar from my wp homepage [closed]
- How to develop child theme for thesis
- Why is the post type on the search result page random?
- Highlight “Show all” item in wp_list_categories
- get_option in header.php not returning value from customizer
- What happens to child theme if I change to new version of parent theme?
- Internal error 500 accessing Theme > Customize
- Save Widget State Between Theme Swaps?
- Display theme layouts [closed]
- Combining CSS files into a single cached one
- How to set a page as homepage in stead of the newspages?
- WordPress Theme Validator?
- Get the amount of posts on a given page
- I used single quote to design HTML of my WordPress blog. Now site redirects to index.php everytime than page.php or single.php
- Is there any way to register custom background images like header images?
- Issue On Displaying Pages with Post Name Permalink
- How to make javascript work on theme options page
- Second menu has the first menu ID
- How to include a file only on dashboard widgets page?
- WordPress: Allowed Memory Size Exhausted – After Moving from Dev to Live [closed]
- What exactly is “wordpress theming”? [closed]
- Present Color Schemes to Clients
- GrandParent ,Parent, Child issue
- View list of all attachments on site
- Change Image Sizes for Mobile Theme
- Dynamically Populating Image/Excerpt/LInks from Pages in WordPress
- Trouble in creating a custom template on twentyeleven theme
- If I remove Category base from my URLs, how difficult will rollback be?
- Is there a list of default generated Gutenberg block CSS? Unable to align video blocks
- Adding popup support to the theme
- How do I change the color of individual page titles in WordPress?
- Programatically Created Menu not Editable in Dashboard
- How toprint informations in footer
- How to implement pagination in category.php template
- Embedding CodePen Calorie Script – jquery error
- How to reduce the vertical space above and below a ul list uniformly with one command?
- Is it possible to echo a woocommerce prouct attribute discription?
- WordPress Menu item > Sub menu Class update
- Duplicate child theme incl. design changes
- How can I use a different template file for the blog index’s paginated pages?
- How to know and change the machine name of a menu?
- How to customize the colors within a stylesheet using a WordPress setting
- Images use & location, on new wordpress theme
- On wordpress, how do i require specific dimensions from user uploads only
- how to create export / import theme options in wordpress without plugin
- Slider should be display in home template [closed]
- WordPress Customization API overwrite LESS variable
- Create image with imagepng() (fails at header)
- Dynamic meta description
- How to Remove Sidebar when get_sidebar() is not get called in page?
- RSS feed url showing page not found. How to solve it?
- How does offset works on pagination? (get_results)
- Plugin or script to apply updated media settings to all featured images
- Header links also appearing in the footer
- Extending arrays in parent theme without completely overriding the files
- WordPress Subpages Fancybox Trouble
- Toolbox theme using printif statement – help needed understanding code block
- Search Results not displaying for multiple word search
- Allow users to edit home page from WordPress (home.php problems)
- WordPress does not know the parametrs i sent to admin post
- Custom Single Page Portfolio Theme [closed]
- ways to create customized theme (hard coded – no pagebuilder)
- Can’t select my block by clicking on it on apiVersion – but using blockProps
- Webpack does not create or update index.asset.php file in build folder
- Is child-theme required when modyfing “Appearence > Editor”?