How to Hide the Header, Title & Description in WordPress Theme

Headers display content such as logos, website titles and sometimes menus, icons and search bars as well. Typical WordPress blog headers include at least the blog name and its tagline, also known as the "description" of the blog. You can hide the header, title and description all at once by setting the whole header to "display: none" in the Cascading Style Sheets. Find the ID name of the header tags first and then edit "style.css" to change settings for the header, selecting it by its ID.

Instructions

    • 1

      Log in to your WordPress blog and navigate to "Appearance" from the left sidebar. Click "Editor" in the submenu and open the "header.php" file found under the "Templates" heading.

    • 2

      Find the tags that wrap around the entire header of your theme. You will either find "<div>" tags or "<header>" tags. Get the ID name of the tags. If the tags do not yet contain an ID name, add one:

      <div id="header">

      <h1><?php bloginfo('name'); ?></h1>

      <small><?php bloginfo('description'); ?></small>

      </div>

    • 3

      Load the "style.css" file in the "Edit Themes" screen by clicking on its link at the bottom of the page. Add this code to the bottom of the file to hide your header, title and description:

      #header {

      display: none;

      }

      Change "header" to the ID name you found in the header tags. When you set "display" to "none," the browser treats the header as if it never existed, although you can right-click to view the source code and see the header tags there.

Tips & Warnings

  • Hide just the title or just the description by targeting the tags that surround those elements, such as "<h1>".

  • Replace "display: none" with "visible: hidden" to hide the header while making it still take up the same amount of space on the screen as when it was shown.

  • Always back up your theme files before editing them. If you make a mistake that causes a PHP error, re-upload the original theme files to get back in to WordPress.

Related Searches:

References

Comments

Related Ads

Featured