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 do I remove a pre-existing customizer setting?
- wp_redirect() – headers already sent
- The the_post_thumbnail without srcset?
- Enqueue Stylesheets After Theme’s “rtl.css”
- Why I can’t add a CSS style in this WordPress theme?
- Use __($str) and _e($str) to translate strings with HTML
- Posts in multiple Categories different single.php
- Custom Theme: The active theme is broken. Reverting to the default theme
- How can I stop WP media uploader from creating duplicates of my uploaded images?
- Customize comment list markup
- Have WP Theme update from Git Repository
- How can a Theme Contain no Header File or Footer File?
- WordPress theme (or plugin) that uses Contenteditable property
- Can a child theme based on Starker theme be released as free to use theme for public use?
- Adding “latest from the blog” to the homepage
- Default comments file and how to copy it
- Changing order title and featured image in blog post (Astra theme)
- Is there a theme function for is_password_protected()?
- Some translations do not work in my template class
- Link won’t show using the_permalink();
- How to get comment meta values by post ID
- Why is the Links Manager visible?
- Check if home.php and set home.php as page_on_front
- qTranslate with my own theme and settings
- Multiple TinyMCE Editors in one Admin Page
- Showing a list of posts when homepage is custom
- Do i need to keep all the default WP templates files in a theme?
- Create a new page in WordPress theme
- How to show user online status on their posts?
- What is the correct way of getting parent styles from child theme?
- How to display all subpages and short by year
- AJAXIFY WordPress Theme Frontend menu
- How can my theme allow users to take advantage of advanced html tags in posts
- Pull request in WordPress repository?
- how to setup custom content structures
- How to Call pages from a Options Panel
- Widget Option is Missing
- Post Content Displaying Below ALL Shortcodes Content
- If you were to start using a WordPress framework today, which one would you use? [closed]
- Register sidebar ‘before’ and ‘after’ html as div rather than li tags
- WordPress Template Part in iFrame
- Is it possible to have a theme that uses only one single page?
- JQuery undefined and Stylesheet loads in bottom along with js files
- Why tags are displayed bellow the content and not inside
- What’s the best way to create a new design for other pages?
- Consequences if using PHP include TEMPLATEPATH?
- Adding a gallery to my first theme
- Headless WordPress + Vue.js on the same server
- How to place POST TITLE any location inside the posts page
- not getting API setting saved confirmation message after update on option page
- Valid SQL query not returning results
- WP_Query not getting all posts, just tagged posts
- how to hide home nav link in wordpress
- Recommended sidebar / content widths
- Converting a theme to a child theme in a network
- Understrap-child conditional js script
- Why excerpt hook not working inside ajax function?
- Help with Core Mods
- How to make updatable custom WordPress theme?
- How can I access variables from theme in child theme? [closed]
- How to handle theme activation errors?
- Local variable name in setup_postdata()
- Using wp_add_inline_style Inside a Template File
- how to edit woocommerce checkout page
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- Display current taxonomy slug in a post
- How to create multiple customizer controls in one control
- Setting a fluid content width
- How can I display and excerpt of all pages with a meta_key and meta_value on index.php?
- get_the_excerpt() removes all p tags in page!
- How to migrate the menu from the site on my own theme in WordPress?
- Why is including all your files within a theme folder important?
- Change default options on attachment page
- Pagination issue with Single.php
- Make theme editor to show all theme’s files
- php file child theme directory not overriding parent theme php file [duplicate]
- How do I change the tagline input to textarea?
- Creating completely new WordPress site from old WP contents
- can’t add EVENT LISTENER to a element
- Should I create a child theme for a parent custom theme? [closed]
- How to Enable Hot Module Replacement with Webpack