• I use Underscores starter theme to customize my layout. It comes with some basic preset html markup, which I want to replace entirely with my custom html. I was wondering if the functionality of the WordPress platform or its plugins may depend on that preset html markup, especially on html tags’ id, so that removing them will may break some of the functionality? Or it is totally safe to remove it altogether?

    Excerpt from header.php:

    <div id="page" class="site">
        <header id="masthead" class="site-header">
            <div class="site-branding">
                ...
            </div><!-- .site-branding -->
        <nav id="site-navigation" class="main-navigation">
                ...
        </nav><!-- #site-navigation -->
    </header><!-- #masthead -->
    
    <div id="content" class="site-content">
    • This topic was modified 8 years, 4 months ago by qwazzy.
    • This topic was modified 8 years, 4 months ago by qwazzy.
    • This topic was modified 8 years, 4 months ago by qwazzy.
    • This topic was modified 8 years, 4 months ago by qwazzy.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, WordPress uses html markup extensively, even the admin dashboard.

    Feel free to create a child theme and customize your css and page templates without limit. All of these customizations are read by WordPress as being in addition to the parent theme, rather than replacing same.
    On the other hand when you want to create your own theme from scratch, just go for it.

    If you’re modifying someone else’s theme, then yes, you could break something if you change IDs and classes – for example, there might be a script that hides #masthead as you scroll the page, or the CSS for .site-branding might be prefixed with #masthead, so you’d lose the styling if you changed #masthead to something else.

    However, if you’re basically building your own theme from scratch, just based on the Underscores framework, then no, changing IDs and classes doesn’t matter in the slightest.

    Ross’s reply isn’t entirely correct, btw, as a child theme’s template file (header.php, for example) completely replaces the parent theme’s version of that file rather than adding to it.

    Hope that helps.

    Thread Starter qwazzy

    (@qwazzy)

    Sorry for not being clear as to which theme exactly I’m using. I use Underscores.me starter theme, so it is just a basic framework for further customization, not a ready-made theme, but it still has some preset markup and I was wondering if it was safe to replace it entirely.

    Peter Hardy-vanDoorn’s answer addressed my concern. Thank you all for the response.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Does html mark up matter for wordpress functionality’ is closed to new replies.