WordPress.org

Ready to get started?Download WordPress

Forums

Hatch
Help tweak some code to remove the header from the blog? (5 posts)

  1. saucer78
    Member
    Posted 2 months ago #

    One of Hatch's weaknesses seems to be the inability to completely remove the large text/image header without coding knowledge. Luckily, I found a thread regarding this issue, where someone was nice enough to post a snippet removing the header from a static home page:

    /*__________static front page: hide title__________*/
    .home.singular-page .hentry .entry-title {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    }
    
    /*__________static front page: content fix__________*/
    .home.singular-page #content { width: 68.0851%; }
    .home.singular-page.page-template-fullwidth #content { width: 100%; }
    .home.singular-page .hentry { width: auto; height: auto;
    }

    This works perfectly for Home and other pages, but - unless I'm seeing another issue - it does not remove the header from the blog. I have nothing at all on my blog page yet - it is simply set as the "Posts" page in the theme's customization settings - however, there is a broken image frame at the top of the page, as seen here: getsrsly.com/blog

    Now I am assuming this is an issue with that pesky header, but I could be wrong. If it is, I would think a snippet of code very similar to that above would knock it out. If it is not, I also welcome any ideas as how to get rid of it. I am very new to css and php, so I greatly appreciate any help!

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 months ago #

    in your posted CSS, .home.singular-page refers to the body_class() output for a static front page;

    the posts page would have .blog instead.

    http://codex.wordpress.org/Function_Reference/body_class

    however, your posted styles have nothing to do with the header image.

    to hide the logo image on the posts page, try:

    .blog #site-title .logo { display: none; }

    there is also something odd in your child theme as it is loading the stylesheets twice (?) - possibly start a new topic for that.

  3. saucer78
    Member
    Posted 2 months ago #

    I appreciate your help, but that snippet hid my actual header logo, not the bad image frame that loads just below the header menu. From what little I know of coding thus far, I think I understand why this is confusing and why people have had trouble finding help for this issue: The Hatch theme calls the block of content that loads near the top of the page the "header." But from what I understand a header is technically the area at the top of a page that contains the logo, menu, social media icons, etc.

    Here in the demo, the Hatch "header" is the picture of the woman and the text to its left, beginning with "I am a wedding, civil partnership and portrait." The theme wants to load this content on every page, but when no image is uploaded, it simply displays the little broken image link icon. I had this exact same issue when I set my homepage to static, but the code above got rid of this "header" (for that page).

    And thanks for pointing out the redundant child theme. I'll have to look into this...

  4. alchymyth
    The Sweeper & Moderator
    Posted 2 months ago #

    the Hatch "header" is the picture of the woman and the text to its left

    unfortunately, none of this seems to be visible in your 'blog' page link.

    purely deducted from the output by body_class(), you could try for the 'posts page' (untested, might have unexpected results):

    /*__________posts page: hide title__________*/
    .blog .hentry .entry-title {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    }
    
    /*__________posts page: content fix__________*/
    .blog #content { width: 68.0851%; }
    .blog .hentry { width: auto; height: auto;
    }
  5. saucer78
    Member
    Posted 2 months ago #

    Right, it's not visible in my blog page, because I haven't set a "header" image in the Hatch Theme Customization settings. (The pic of that woman is just for the theme demo.) You'd think this would disable that "header" altogether, but what happens is, when you try to then build a page/post, the theme pulls all of that data into that "header," squeezing it down to make it fit. At least, that's what was occurring on the static home page.

    Thank you for taking the time to recode those snippets for my blog posts page, but it looks like they're not working either (no noticeable effect on anything).

    I'm about to reinstall WordPress, as I'm having child theme issues as well (started another thread) and short on time, but will update this when I find a fix.

Reply

You must log in to post.

About this Theme

About this Topic