WordPress.org

Support

Support » Themes and Templates » Remove page title from top of main content area

Remove page title from top of main content area

  • I just designed a site for my small business, I have a static home/front page instead of a blog and want a banner advertising my business, not ‘home’ to be the first words in the main content area. On the other pages I do not mind if the page title, such as ‘contact’ is the first word on the page, but can easily type this into the body of the text so the css stays consistent for all the pages. How can I edit the theme or add custom css to achieve this?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Clarification: All text/ banners/ images I have already designed and placed on the page I really just want to get rid of the page title

    WPyogi
    Forum Moderator

    @wpyogi

    If you post a link to your site someone can likely help you with that.

    I am still changing a few things so this is the test site so to speak. http://66.147.244.162/~cornerto/
    I am new to all of this so I’d appreciate any assistance you have to offer!

    WPyogi
    Forum Moderator

    @wpyogi

    What’s your preference – do you want those titles off every page or just home?

    WPyogi
    Forum Moderator

    @wpyogi

    To remove it only from the home page, use this – add to Custom CSS for your theme:

    .home .entry-title {
    	position: absolute !important;
    	clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
    	clip: rect(1px, 1px, 1px, 1px);
    }

    To remove from all pages, use this

    .page .entry-title {
    	position: absolute !important;
    	clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
    	clip: rect(1px, 1px, 1px, 1px);
    }

    Thank you so much! Is the basic logic behind the first line just calling up a specific page, so that if you wanted to pick and choose you would enter .home .contact .entry-title ? Also, does IE need specific comma less dimensions for all CSS? Sorry for so many questions I am just trying to learn, your posts are incredibly helpful.

    WPyogi
    Forum Moderator

    @wpyogi

    Close 🙂 . To target a specific page, you can look in the HTML code using View Source in a browser for the body tag to see the page specific class – so your home page looks like this:

    <body class="home page page-id-19 page-template-default custom-background page-template-template-sidebar-content-php">

    But most pages don’t have that tidy kind of “home” class – so then you’d need to use the class .page-id-19 in the CSS where .home is in the above.

    So your Reports page has:

    <body class="page page-id-11 page-template-default custom-background page-template-template-sidebar-content-php">

    So it would be:

    .page-id-11 ..... {
       styles;
    }

    The dots can be whatever “selectors” for the element you are changing.

    Modern IE 9+ should be okay with most standard CSS

    Ahh, I get it! Thanks again.

    Thanks WPyogi.

    I’ve successfully removed the page titles begin repeated in the body section following your advice

    lacholmes
    Member

    @lacholmes

    Hide Homepage Content. Have tried all sorts of CSS combinations. Can’t seem to delete/hide it. Please help. http://smartrecipe.com

    samuelleon
    Member

    @samuelleon

    It is working for me, although it is also deleting my sticky-post titles, is there a workaround?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Remove page title from top of main content area’ is closed to new replies.