Jump to content


Photo
- - - - -

Hide Header from Certain pages

header Global Section

Best Answer Simon_P , 05 March 2014 - 07:09 PM

Every page in WordPress has an ID and it is in the pages body classes.

From the docs: https://codex.wordpr...ence/body_class

So your class might be page-id-34 (if your page ID was 34) Go to the full post


  • Please log in to reply
3 replies to this topic

#1 seanocaside21

seanocaside21

    Advanced Member

  • Members

  • 75 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 05 March 2014 - 06:11 PM

Hi There,

 

I was looking for some help with Hiding the Header global region from certain pages.

 

In this instance the page name is "Services Directory" or slug services directory. 

I presume it is possible to do this with something like:

 

#header.... Target Page {display:none !important; }

 

I just having trouble targeting the specific page. 

 

Thanks,

 

Sean



#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 05 March 2014 - 07:09 PM   Best Answer

Every page in WordPress has an ID and it is in the pages body classes.

From the docs:

Please Login or Register to see this Hidden Content



So your class might be page-id-34 (if your page ID was 34)

#3 seanocaside21

seanocaside21

    Advanced Member

  • Members

  • 75 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 05 March 2014 - 07:42 PM

@

Please Login or Register to see this Hidden Content

Excellent! worked a treat :) 

 

Here is the code for anyone else who wants to do the same: 

 

.page-id-13 #header {display:none !important; }

 

Thanks for your help! 



#4 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 06 March 2014 - 01:00 AM

Thank you for updating the thread and posting the solution you used.







Also tagged with one or more of these keywords: header, Global Section