StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-27-2011, 03:51 PM
Godfather Godfather is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Orlando, FL - Florence, Italy
Posts: 203
Default How to add H1 to home page only and not posts

This is a continuation of the question that was originally posted, answered, and closed here:

http://www.studiopress.com/support/s...ad.php?t=74344

We were using a custom image header on an older Revolution magazine theme that was not pulling the site title as the h1. We were provided the code to add the h1 to the home page and it worked great (thanks Charles)!

However, we did not realize it was also adding this h1 tag to all of the individual posts. So now we have two h1 tags on the post pages (Site Title and Post Title). We only want the site title to be the h1 tag on the home page (as we did not have one). On the posts we want to keep the post title as the sole h1 tag.

The site is:

http://noteinvestor.com/

The code that was added in the header.php theme file was:

<?php echo '<h1 style="text-indent: -9999px; height: 0; margin: 0;">' . get_bloginfo( 'name' ) . "</h1>\n"; ?>

Thanks
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:10 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.