Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] How to suppress the title on one page? (http://forum.bytesforall.com/showthread.php?t=23544)

Ob1knorrb Sep 7, 2016 09:53 PM

[SOLVED] How to suppress the title on one page?
 
I have one page that gets populated by a parameter and I would like to suppress the title on just that page.
I saw a previous posting on how to do it for the home page but couldn't seem to get that to work
I tried putting a few variations of this into the CSS Inserts but nothing seemed to work

body.ice-products/product_page_test div.post-headline {display:none;}

Here is a page I'm using for testing this:
http://www.icewebring.com/ice-produc...ern%20Mirkwood

Any help would be appreciated, thanks!

juggledad Sep 8, 2016 03:03 AM

ok how did you come up with the CSS? where did you get the classes you are using with the 'body'?
1) go view that page
2) use the browsers 'view source' option to see teh source of the page
3) optional - copy the page source to a text editor
4) find the 'body' element
5) list the classes you can use with the body statement

Ob1knorrb Sep 8, 2016 07:58 AM

I started with what was posted in this thread:

http://forum.bytesforall.com/showthread.php?t=23405

The classes that are listed in the page that seem relevant are:

div.post-headline{}div.post-headline h1,
div.post-headline h2{ margin:0; padding:0;padding:0;margin:0;text-align:center}
div.post-headline h2 a:link,
div.post-headline h2 a:visited,
div.post-headline h2 a:active,
div.post-headline h1 a:link,
div.post-headline h1 a:visited,
div.post-headline h1 a:active{color:#666666;text-decoration:none}
div.post-headline h2 a:hover,
div.post-headline h1 a:hover{color:#000000;text-decoration:none}

Later in the page where the title actually gets used looks like this:
<div class="post-headline"><h1>Product_Page_test</h1></div>

Part of what I'm unsure about is what the proper way to reference the actual page is, it's a subpage so do I need to include the parent page as part of the name? Does the fact that I'm calling it with a parameter make a difference?

Thanks!

juggledad Sep 8, 2016 08:01 AM

Maybe I wasn't clear. View the source of the page in your browser. Find the <body class=".....">
Now, what are the classes?

FYI - I know the answer, I'm going to make you find them so you will learn how to do this

Ob1knorrb Sep 8, 2016 09:07 AM

Ahh, I see,

<body class="page page-id-711 page-child parent-pageid-38 page-template-default logged-in admin-bar no-customize-support" >

Learning is good, I try and do it all the time :)

Ob1knorrb Sep 8, 2016 09:37 AM

After logging out
<body class="page page-id-711 page-child parent-pageid-38 page-template-default" >

Ob1knorrb Sep 8, 2016 09:42 AM

I took an educated guess that the "page-id-711" was the critical piece I needed and went with this:

body.page-id-711 div.post-headline h1 {display:none;}

Worked like a charm :)

Thanks!

juggledad Sep 8, 2016 11:19 AM

Excellent!! You get an 'A' ;)


All times are GMT -6. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.