• Hi Guys

    I was hoping someone can help. Currently messing around with the CSS of Make (great theme) to get something along the lines I want for a new blog.

    For the Home Page I want both the “main head area” and “header nav” to appear but on some I just want “header nav” to appear. Like the two other pages I have “about” and “contact” and the post and archive pages it would be great if I could keep the “header nav” but not the “main head area”

    I was hoping I would be able to do something like

    #about .site-header-main{
     display: none;
    }

    but it doesn’t seem to work. Is there anyway I can apply this code just to the post, archives, about and contact pages?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey there drewstain,

    Hope you’re well today ??

    This is definitely possible with the correct selector. Every page has its own class with the ID in the body element which you can use to target that specific class. You can check that by using developer tools, so what you need to do is go to your about page right click and click inspect element and search for body element in the top of your inspector, see screenshot https://screencast.com/t/dCaxT7W9ocII.

    So considering .site-header-main is the correct class you’d want to add something like this:

    .page-id-2 .site-header-main {
     display: none;
    }

    This will remove that only for that specific page. You can apply the same thing for your single post pages and archive pages, see following screenshots:

    -for single post pages https://screencast.com/t/sEzv1X4Vfq
    -for archive pages https://screencast.com/t/YhCJuRlg1aNc

    Hope this helps and have a great weekend ??

    Cheers,
    Bojan

    Thread Starter drewstain

    (@drewstain)

    Hi Bojan

    Yes! I remembered this was possible using page ID’s after I posted but I couldn’t remember the correct code to use so thank you so much!

    Is it possible to do it on ALL posts somehow? or would I need to add the code each time a new post was added and an ID created?

    Andrew

    Hey again Andrew,

    Please check my single post pages screenshot again (https://screencast.com/t/sEzv1X4Vfq).

    As you can see in single post pages there are postid-556 and single-post classes there.

    postid-556 should target that specific post while single-post as highlighted on that screenshot should cover all single post pages if that makes sense.

    Hope this helps ??

    Cheers,
    Bojan

    Thread Starter drewstain

    (@drewstain)

    Sorry! thanks great! thanks for being so helpful so quickly!

    Andrew

    Hey Andrew,

    Glad I could help ??

    Cheers,
    Bojan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘removing "main head area" but keeping "header nav" on some pages but not all’ is closed to new replies.