How to hide Page titles


  Page 1 of 2 Next Last 
Author Message
Sean

Posted: 7/9/2009
Quote message 

I am using static pages in wordpress, and I want the page title to appear in the Navigation bar, but I would like to hide it on the page, because it is not aesthetically pleasing.
 
Bob

Posted: 7/9/2009
Quote message 

This little section in page.php is what puts the title on the page. Remove it or rem it out and no titles will display on your pages.

<h2 class="PostHeaderIcon-wrapper">
<span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?>
</a></span>
</h2>

This is from a template that has no article header block or icon. If your theme has that you need to take out some additional div tags.

 
Bud

Posted: 7/9/2009
Quote message 

If Artisteer would put semantic classes in the body class if would be easy. Fortunately it's a very easy hack if your running WP 2.8. Just find the body tag in the header.php file...

<body>


and add this...

<body <?php body_class(); ?>>


Now all you need is some CSS...

.page .PostHeaderIcon-wrapper, .page .PostMetadataHeader	{ display:none; }


This will remove the display of the post header block but only on pages.

You can even edit the Artisteer source header.php file and add this so it is already there when exported.

Works great

 
Ellen

Posted: 7/12/2009
Quote message 

Quote Bob:

This little section in page.php is what puts the title on the page. Remove it or rem it out and no titles will display on your pages.

<h2 class="PostHeaderIcon-wrapper">
<span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?>
</a></span>
</h2>

This is from a template that has no article header block or icon. If your theme has that you need to take out some additional div tags.



I love you BOB! Been trying to take this off for so long. Is the title still a H1 tag? SEO is still good?

However, I tried the same thing on the Single Post (single.php) and it doesn't work. So my posts all look like this on top:


Archive for the ‘blah blah Review’ Category
blah blah Review
blah blah Review

pretty redundant...would like just 1 'blah blah review' on post page. How do I get the top 2 lines off?

I set the home page to the static page; I am using posts only for product reviews and pages for info. I am assuming this is why each post page is separate and not all on the same page. Right? (I am learning slowly how WP operates)

Any response would be greatly appreciated.

I love Artisteer! 8-)
 
Bob

Posted: 7/12/2009
Quote message 

I'm not sure I follow you. A page that has the "Archive for..." is not single.php it would be Archives.php. Whats the url of your site so so I can see what you are talking about.
 
Ellen

Posted: 7/12/2009
Quote message 

Quote Bob:

I'm not sure I follow you. A page that has the "Archive for..." is not single.php it would be Archives.php. Whats the url of your site so so I can see what you are talking about.


http://yeastinfectionsolution.info



 
Bob

Posted: 7/12/2009
Quote message 

So are you adding the title to the post with the h1 tag??
 
Ellen

Posted: 7/12/2009
Quote message 



I am just filling in the title in the space provided on the post page--iust like I do the pages. Just like the pages, (before I removed what you showed me) it has a block with the title and the title again under it. The 'archives' thing also shows on top...I would just like the post page to look just like you see the pages now...1 title

does my page still have the H1 tag now that I removed the code you gave me?
 
bob

Posted: 7/12/2009
Quote message 

When I click on a link in your top left side bar (categories) you have one article under that and it is named the same as the category. In the category listing if I were to remove the title block from the posts how would you get to that individual post. You really have one category (book reviews) but 4 articles or posts. You could just replace that Category block with a Recent Posts block and title it Book Reviews.

Not sure what you mean if it still has the h1 tag. Your title will still be avaiable in the header even if its not displayed on top of the post.

Taking the stuff out you want is no problem but is a little more than the page file. You might be better email me the Archives.php file and the single.php file.
- Bob
bob@gdscomp.com

 
XSlord

Posted: 7/14/2009
Quote message 

Hi Bud,

It's not working on my template, the CSS code you mention, should that go in to the style.css (if so where should it be inserted?)

Thanx in advance for your answer!


Quote Bud:

If Artisteer would put semantic classes in the body class if would be easy. Fortunately it's a very easy hack if your running WP 2.8. Just find the body tag in the header.php file...

<body>


and add this...

<body <?php body_class(); ?>>


Now all you need is some CSS...

.page .PostHeaderIcon-wrapper, .page .PostMetadataHeader	{ display:none; }


This will remove the display of the post header block but only on pages.

You can even edit the Artisteer source header.php file and add this so it is already there when exported.

Works great



 
Bud

Posted: 7/14/2009
Quote message 

Hey XSlord,

It doesn't matter where you put it because we're being very specific. If you can put it at the end of the style.css to be safe, that's fine.

You could even use the page_slug instead of .page to refine it to a specific page.
 
Garry

Posted: 7/14/2009
Quote message 

If your are using Artsiteer 2.2, delete following code from your page.php, single.php and index.php to remove titles of posts

<h2 class="art-PostHeaderIcon-wrapper">
<span class="art-PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?>
</a></span>
</h2>

To also remove date, author etc. remove following code also from all three files.
<div class="art-PostHeaderIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>
</div>
 
Xyclops

Posted: 7/24/2009
Quote message 

Ellen - if you remove the following from archive.php you will not have the 'Archives for XXX category' displayed on your archives pages:

<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="pagetitle"><?php printf(__('Archive for the &#8216;%s&#8217; Category', 'kubrick'), single_cat_title('', false)); ?></h2> <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <h2 class="pagetitle"><?php printf(__('Posts Tagged &#8216;%s&#8217;', 'kubrick'), single_tag_title('', false) ); ?></h2> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h2 class="pagetitle"><?php printf(_c('Archive for %s|Daily archive page', 'kubrick'), get_the_time(__('F jS, Y', 'kubrick'))); ?></h2> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h2 class="pagetitle"><?php printf(_c('Archive for %s|Monthly archive page', 'kubrick'), get_the_time(__('F, Y', 'kubrick'))); ?></h2> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h2 class="pagetitle"><?php printf(_c('Archive for %s|Yearly archive page', 'kubrick'), get_the_time(__('Y', 'kubrick'))); ?></h2> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h2 class="pagetitle"><?php _e('Author Archive', 'kubrick'); ?></h2> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h2 class="pagetitle"><?php _e('Blog Archives', 'kubrick'); ?></h2> <?php } ?>  <?php $prev_link = get_previous_posts_link(__('Newer Entries &raquo;', 'kubrick')); $next_link = get_next_posts_link(__('&laquo; Older Entries', 'kubrick')); ?>  <?php if ($prev_link || $next_link): ?> <div class="navigation"> 	<div class="alignleft"><?php echo $next_link; ?></div> 	<div class="alignright"><?php echo $prev_link; ?></div> </div> <?php endif; ?> 


It might be slightly different in your themes (I've not created many Artisteer themes yet) but this did the trick for me.
 
Ellen

Posted: 8/5/2009
Quote message 

Quote Xyclops:

Ellen - if you remove the following from archive.php you will not have the 'Archives for XXX category' displayed on your archives pages:

<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="pagetitle"><?php printf(__('Archive for the &#8216;%s&#8217; Category', 'kubrick'), single_cat_title('', false)); ?></h2> <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <h2 class="pagetitle"><?php printf(__('Posts Tagged &#8216;%s&#8217;', 'kubrick'), single_tag_title('', false) ); ?></h2> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h2 class="pagetitle"><?php printf(_c('Archive for %s|Daily archive page', 'kubrick'), get_the_time(__('F jS, Y', 'kubrick'))); ?></h2> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h2 class="pagetitle"><?php printf(_c('Archive for %s|Monthly archive page', 'kubrick'), get_the_time(__('F, Y', 'kubrick'))); ?></h2> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h2 class="pagetitle"><?php printf(_c('Archive for %s|Yearly archive page', 'kubrick'), get_the_time(__('Y', 'kubrick'))); ?></h2> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h2 class="pagetitle"><?php _e('Author Archive', 'kubrick'); ?></h2> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h2 class="pagetitle"><?php _e('Blog Archives', 'kubrick'); ?></h2> <?php } ?>  <?php $prev_link = get_previous_posts_link(__('Newer Entries &raquo;', 'kubrick')); $next_link = get_next_posts_link(__('&laquo; Older Entries', 'kubrick')); ?>  <?php if ($prev_link || $next_link): ?> <div class="navigation"> 	<div class="alignleft"><?php echo $next_link; ?></div> 	<div class="alignright"><?php echo $prev_link; ?></div> </div> <?php endif; ?> 


It might be slightly different in your themes (I've not created many Artisteer themes yet) but this did the trick for me.


thanks for the code...what I wound up doing is I replaced the category block with the recent post block and that makes it better and takes out the 'archives' bit.

However, I would like to change the order of these book reviews and am not sure how to do it. Would I have to copy/paste them and enter posts as usual--adding the post last that I want to be listed 1st?

 
Ellen

Posted: 8/5/2009
Quote message 

Does anyone know how to take the drop-down menu off without going into the Artisteer theme? When I updated the new version, I lost the original theme to another site I had. I have most of it redesigned, but I still can't get it to look like the original...

I have it set as with header on top then , menu bar.
 
Art Schobey

Posted: 8/5/2009
Quote message 

I want to remove the title only from the (static) home page.

How do I do this and leave the default pages intact.
 
Garry

Posted: 8/5/2009
Quote message 

@ Art Schobey

Remove following code from your page template (file) you are using for your home page to remove post headings:

<h2 class="art-PostHeaderIcon-wrapper">
<span class="art-PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?>
</a></span>
</h2>

To also remove date author etc remove following code also.

<div class="art-PostHeaderIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>
</diV>


-------------------------------------------------------------------------------------

@ Ellen
Open you theme in Artisteer choose no sub item and save it and you'll have no drop down menu:

menu-> sub item-> level-> no sub item
 
Warren

Posted: 8/6/2009
Quote message 

This is the solution I found on the wordpress site. It is quick and
worked like a charm.

just put the following into style.css
change "23" to what the page id really is (probably post -1)

#post-23 h2 {display:none;}

 
Mike E.

Posted: 9/13/2009
Quote message 

@Warren,

I saw this as well, and I could not get it to work on my Artisteer generated theme. This is what I did:

in page.php, find

<h2 class="art-PostHeaderIcon-wrapper">


and replace it with

<h2 class="art-PostHeaderIcon-wrapper" <?php echo($_SERVER["REQUEST_URI"] == '{uri_of_your_home_page}' ? 'style="display: none"' : 'something else') ?>>


I like your solution better, but I couldn't get it to work. I found the ID # of my Home page, didn't work. And I looked all over the code for an ID that looked like #post-{post_ID}, couldn't find anything.

I'm a little bummed that I'll need to make this hack every time I update the template, but it does work like a charm.

I'm new to Artisteer, but I'm loving it so far. Perhaps in future releases you could let us provide a list of URI's to suppress titles on?
 
Mike E.

Posted: 9/13/2009
Quote message 

:-(

Left in my debug code. Doesn't hurt anything, but it's sloppy. Should have been
<h2 class="art-PostHeaderIcon-wrapper" <?php echo($_SERVER["REQUEST_URI"] == '{uri_of_your_home_page}' ? 'style="display: none"' : 'something else') ?>>

 
Mike E.

Posted: 9/13/2009
Quote message 

Quote Mike E.:

:-(

Left in my debug code. Doesn't hurt anything, but it's sloppy. Should have been
<h2 class="art-PostHeaderIcon-wrapper" <?php echo($_SERVER["REQUEST_URI"] == '{uri_of_your_home_page}' ? 'style="display: none"' : 'something else') ?>>



Time to step away from the keyboard. Just remove the "something else" and leave empty single quotes.
 
Steve B

Posted: 10/1/2009
Quote message 

Ok, I got this to work, i.e. removed title, BUT on every static page not just the home page. Also had to remove one equal sign [see DrBunn.com]. I took the code back out until I can figure out how to remove the title from the home page only.

<h2 class="art-PostHeaderIcon-wrapper" <?php echo($_SERVER["REQUEST_URI"] = '{uri_of_your_home_page}' ? 'style="display: none"' : '') ?>>


So am I missing something?
 
Garry

Posted: 10/1/2009
Quote message 

You should create a new page template as following, assign it to your home page and remove the title from this newly created page template as I described above:

Copy all code from page.php, create a new file(.php) name it any of your choice and paste the copied code in it, add following code on top of it:

<?php
/*
Template Name: new template
*/
?>

Upload that file into your theme folder and your new template will be available to you to choose from a drop down list when you add new page or edit existing page.

You can change this template's structure to your needs; you can assign a new name to your sidebar and you’ll be able to add desired widgets to this sidebar from widgets page. Now you can use this page template on pages where you need different structure and different set of widgets

 
Steve

Posted: 10/2/2009
Quote message 

Garry!

That did it. Somehow I thought I tried that earlier with problems, but it worked just fine. Thank you!
 
Amber

Posted: 3/29/2010
Quote message 

I have tried all these fixes to remove the space between the menu and my page post, but none of them have worked. I have no idea where I'm going wrong.

Adding to the body tag and css file seems to have had no effect and removing the h2 section from the php files did get rid of the page title, which is great, but there's still a block there. Is this a completely different item or something?

http://www.nsvintage.com/main/?page_id=199
 
@Amber

Posted: 3/29/2010
Quote message 

Try this post:

http://www.artisteer.com/?post_id=117186&p=forum_post&forum_id=13

David
 
Amber

Posted: 3/29/2010
Quote message 

Thanks :) Headed over there.
 
Cassie

Posted: 1/4/2011
Quote message 

@ Garry et al
Did Artisteer change their code? I started using it about a year ago for just one site, and now I'm doing another. In the theme I used a year ago, there is only one page.php file, but in the new theme I'm using now, there is a regular page.php file and also a page.php file in the templates section of the Editor. The regular file has only about 10 lines, and it's all php code. The template version has a lot more code, but no php code... it's all html code, and there is not one mention of h2 or other headings. There is no template code at the top of the file like other (non-Artisteer-generated) template files I've seen.
Tearing my hair out,
Cassie
 
Cassie

Posted: 1/4/2011
Quote message 

@ Garry et al
I meant to say in my other post that I'm trying to hide the page title on my static home page also, to no avail with my Artisteer theme. Will I have to ditch Artisteer or has the WordPress codex changed?
 
Banicek

Posted: 1/4/2011
Quote message 

Is any way to change h2 to h1 of postname in artisteer 3?
 
  Page 1 of 2 Next Last