Title: Cannot hide title with CSS
Last modified: November 21, 2022

---

# Cannot hide title with CSS

 *  [geowb](https://wordpress.org/support/users/geowb/)
 * (@geowb)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-hide-title-with-css/)
 * Using v6.1 I’m attempting to build a sample page-only site for a client. (Disclosure–
   I’ve not used WordPress for years.) I’m hung up getting started, trying to shrink
   or eliminate showing page titles.
 * Page titles are rendered with `<h1 class="wp-block wp-block-post-title ...` ,
   which is immense.
 * I tried adding CSS:
 *     ```
       .wp-block .wp-block-post-title {
       visibility: hidden;
       }
       ```
   
 * or with `display: none;`
 * but there is no change. Nor are there any well-regarded plugins that claim to
   be compatible with the version of WordPress I’m using.

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

 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-hide-title-with-css/#post-16217662)
 * CSS is CSS, nothing to do with WordPress 😀
 * Most likely your selector is not specific enough, or is incorrect… that’s why
   it’s not working.
 * Please provide the URL of the page in question, so I can check the code on the
   page and help you with this.
 * Standing by.
 *  Thread Starter [geowb](https://wordpress.org/support/users/geowb/)
 * (@geowb)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-hide-title-with-css/#post-16219715)
 * Thanks for your reply. The page only exists on my development server and is not
   available in the wild. I take it that “…CSS, nothing to do with WordPress” means
   that website styles are not accessible to casual users/developers such as myself.
   I can see the classes of site elements using the browser’s inspector. And I’m
   used to having control over the css. I’ll probably have to dig deeper to learn
   how to better control the appearance of pages. Thanks anyway.
 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-hide-title-with-css/#post-16219969)
 * > I take it that “…CSS, nothing to do with WordPress” means that website styles
   > are not accessible to casual users/developers such as myself.
 * Actually what I meant was that you don’t really need any WordPress-specific knowledge
   to write custom CSS to style the page (other than knowing where to put the CSS
   code in your WordPress dashboard).
 * Whether it’s WordPress, Joomla, Drupal, or even plain ‘ole static HTML… doesn’t
   make any difference: you simply need to know your standard [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors)
   and [specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity)
   rules and the knowledge of your browser’s developer tools.
 * For instance, you said the page title has this:
 * `<h1 class="wp-block wp-block-post-title ...`
 * But you’re using the selector:
 *     ```
       .wp-block .wp-block-post-title {
   
       }
       ```
   
 * … which is wrong (according to CSS rules, not WordPress rules).
 * Since the two classes are defined together for the same element, there should
   be no space in the class names in the selector. So this should be
 *     ```
       .wp-block.wp-block-post-title {
   
       }
       ```
   
 * But I don’t know if there are other elements on the page with the same classes,
   so better safe by limiting it to the h1 element only, so it becomes
 *     ```
       h1.wp-block.wp-block-post-title {
   
       }
       ```
   
 * And this will affect ALL pages that have an `h1` element with these classes. 
   If this is just for the homepage, you’ll need to add the homepage’s unique body
   class to it (provided your theme includes the body classes!), so it becomes:
 *     ```
       .home h1.wp-block.wp-block-post-title {
   
       }
       ```
   
 * All these have nothing to do with WordPress per se: they’re just basic CSS rules(
   which is what I was trying to say earlier.)
 *  Thread Starter [geowb](https://wordpress.org/support/users/geowb/)
 * (@geowb)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-hide-title-with-css/#post-16220062)
 * Thanks. I’d forgotten how opaque WordPress is. It’s going to take few more hours
   to get oriented. I appreciate your efforts but I’m starting back at the bottom
   of my learning curve. Patience is required.
 * Be well.
 *  Thread Starter [geowb](https://wordpress.org/support/users/geowb/)
 * (@geowb)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-hide-title-with-css/#post-16221294)
 * An observation: the `<h1...` title only appears when editing a page. For a site
   visitor that title is not displayed. Two questions: What is the advantage of 
   having an immense title appear when one is trying to create a page and no visitor
   will ever see that title? Is there any way to create and edit a page without 
   that large scale header?

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

The topic ‘Cannot hide title with CSS’ is closed to new replies.

## Tags

 * [title](https://wordpress.org/support/topic-tag/title/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [geowb](https://wordpress.org/support/users/geowb/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-hide-title-with-css/#post-16221294)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
