Archived

This topic is now archived and is closed to further replies.

  • 0

hide page heading for specific page

Question

Posted · Report post

Hi there, I'm trying to hide the page title for only one page because it doesn't look good under the "Boxes" above (for the staff photos and names) for this particular template page i set up. I need the "content" to appear below (i tried also to use a "content box" but as i already have a "content box" set up for the top area above my branding, it duped it when i tried to have two content boxes on one page--that was weird too, but another issue) but without the header title saying 'board members'. You can see what I mean when you view it here (it's password protected and the PW is pagelines): http://cabvi.mpwclient.com/about/board-members/ I tried firebug but couldn't find the right selectors...can someone help??? I was trying to do a display:none approach... Thanks a bunch! Tan

Share this post


Link to post
Share on other sites

23 answers to this question

Posted · Report post

Hello Phillip,

Do you need further assistance with this?

Share this post


Link to post
Share on other sites

Posted · Report post

You can also find the page-id by looking at the pagetitle when you're editing a page in Wordpress. It will show something like: /wp-admin/post.php?post=XX&action=edit if you use the number at the XX for page-id-xx you're good to go.

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

Tan, It takes a combination of the post ID and .hentry and .entry-title:

.post-id-25 .hentry .entry-title {
	    display: none;
	    margin: 0;
	}

Let us know if that works.

Share this post


Link to post
Share on other sites

Posted · Report post

hi rangelone, that's what i got off firebug too...and i tried it again but nothing... :( any other ideas?

Share this post


Link to post
Share on other sites

Posted · Report post

@janpeeters, hi! thanks for the tip! i'm actually trying to do the same exact thing for the home page of this site: http://familydanz.mpwclient.com where the page id is 15 so i did:

body.page-id-15 h1.entry-title.pagetitle {display: none;}

and it doesn't work. :( do you have any idea why?? i followed the exact steps above and i'm stumped. :( thanks so much! tan

Share this post


Link to post
Share on other sites

Posted · Report post

Where did you add the code?

Share this post


Link to post
Share on other sites

Posted · Report post

in the base theme's style.css... should it not be there? i've done other mods and added it there without a problem...

Share this post


Link to post
Share on other sites

Posted · Report post

I've had difficulty with the Base Theme's functions and css files. Have you tried the pagelines-customize plugin? I've found much better results there.

Share this post


Link to post
Share on other sites

Posted · Report post

hi henry, no, i haven't tried the customize plugin...i'm not sure if can use both now that i've started using the other. i also tried the above code in the custom codes section of dashboard > pagelines > custom code and no go there either... i have no idea how to implement this using "content" section...maybe some other method that i'm not seeing?

Share this post


Link to post
Share on other sites

Posted · Report post

You can use both together, as long as same content doesn't appear in both. (just to avoid redundant styling) Add this to your pagelines-customize plugin style.css

#post-25.hentry h1, .hentry h2, .entry-title.pagetitle {
	  margin-bottom:1em;
	  margin-left:0;
	  margin-right:0;
	  margin-top:1em;
	  display:none;
	}
	

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Henry, that worked BUT it also took away the headers on all the other pages and didn't target that particular post...

Share this post


Link to post
Share on other sites

Posted · Report post

Try this CSS instead:

body.page-id-25 h1.entry-title.pagetitle {
	  display:none;}

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Henry! I totally figured it out thanks to a combo of yours and Rangelone's code... I took your #post-25.hentry and plugged it into his other selectors--and it worked! So the final code that worked was:

#post-25.hentry .entry-title {
	    display: none;
	    margin: 0;
	}

What I don't get is HOW to get that code from using Firebug. I use Firebug often but with pageslines I have so many problems trying to find the selectors and feel like such a noob all the time. I just don't GET what I'm missing... In any case, thanks for your help! That #post-25 did the trick!!

Share this post


Link to post
Share on other sites

Posted · Report post

@Catrina, Hi! I just saw your message and tried that too and it worked! Thanks so much! My comment from above still stands:

What I don't get is HOW to get that code from using Firebug. I use Firebug often but with pageslines I have so many problems trying to find the selectors and feel like such a noob all the time. I just don't GET what I'm missing...[/quote Do you have any tips?

Share this post


Link to post
Share on other sites

Posted · Report post

You're welcome :). If you're trying to do something on one specific page (in this case, the Board Members page), the first selector you need to use is the one in the body tag, which is at the top of the source page and it's always in the format page-id-# (# is replaced by the ID number for that specific page). So far that CSS will look like this:

body.page-id-25
...But it's not done yet. You need to add the selector for the page element you're trying to customize (in your case, you want to hide the page title. The page title selector is going to look like this when it's found in Firebug:

There's a space between "entry-title" and "pagetitle". In the CSS selector you use, you just need to replace that space with a period so that it looks like this:
h1.entry-title.pagetitle
So the CSS will now look like this when you add the selector above:
body.page-id-25 h1.entry-title.pagetitle
...and then the CSS attributes you want are put inside curly brackets:
body.page-id-25 h1.entry-title.pagetitle
	{attribute: style; attribute: style; attribute: style;}

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

awesome, thanks so much for taking the time to help, catrina. i can't wait to try it out on something else! :)

Share this post


Link to post
Share on other sites

Posted · Report post

@catrina, i actually tried what you mentioned above on another site and it's not working...any ideas on why? is it because it's a home page? http://familydanz.mpwclient.com where the page id is 15 so i did:

body.page-id-15 h1.entry-title.pagetitle {display: none;}

Share this post


Link to post
Share on other sites

Posted · Report post

@pross I went to download the new framework but only 2.1.6 is available for download. Are you just letting me know that 2.2 is coming out or am I missing the update somehow? Thanks for your help!

Share this post


Link to post
Share on other sites

Posted · Report post

2.2 will be next major release not available quite yet, just saying you can use this new method when it is.

Share this post


Link to post
Share on other sites

Posted · Report post

ah, ok thanks! do you have any idea what I should do until then? I think I followed Catrina's advice correctly and still I can't figure it out. :(

Share this post


Link to post
Share on other sites

Posted · Report post

	.home .pagetitle {
	    display: none ;
	}
	
that'll do it, you have this in your custom css:
	home .pagetitle {
	    display: none ;
	}
	

Notice you are missing a dot.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi All,

Just wanted to say thanks, its taking me ages to work this out. I'm trying to sort out my contact page and didn't want the title to be on view.

So thanks!

Share this post


Link to post
Share on other sites