by crowly
2 replies
  • WEB DESIGN
  • |
Hi guys,

I need some geek mate to help me include H1 tag into the logo:


<div id="header" class="clearfix">

<div class="h_left">
<?php if ( get_option('ptthemes_show_blog_title') ) { ?>
<div class="blog-title"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a> </div>
<p class="blog-description">
<?php bloginfo('description'); ?>
</p>

<?php } else { ?>
<a href="<?php echo get_option('home'); ?>/"><img src="<?php if ( get_option('ptthemes_logo_url') <> "" ) { echo get_option('ptthemes_logo_url'); } else { echo get_bloginfo('template_directory').'/images/logo.png'; } ?>" alt="<?php bloginfo('name'); ?>" class="logo" /></a>
<?php } ?>
</div> <!-- h_left #end-->


That's the Emporium form Templatic.

Huge Thanks
Crowly
#header #logo
  • Profile picture of the author MoneyMonkey
    Put it before the blog info name, I think. <h1>content</h1> That is what I would try to do atleast.
    {{ DiscussionBoard.errors[3507389].message }}
    • Profile picture of the author Rovi
      I'm assuming you want to get the bloginfo('name') into h1 tags for SEO.

      First case: get_option('ptthemes_show_blog_title') is true -

      I would try:

      <div class="blog-title"><h1 class="h1reset"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1></div>

      in css: .h1reset {style it so it looks right}

      OR:
      <h1 style="blog-title"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>

      Style it as display:block and whatever else to make it behave like the div did.
      ~~~~~~~~~~~~~~~~~~~~~~~
      Second case: test is false -

      <?php
      $imgurl = isset( get_option('ptthemes_logo_url') ? get_option('ptthemes_logo_url') : get_bloginfo('template_directory').'/images/logo.png' ;
      ?>
      <h1 style="background-image: url(<?php echo $imgurl; ?>) no-repeat;"><em style="position:absolute;left:-9999em"><?php bloginfo('name'); ?></em></h1>

      You'd want to style the dimensions of the logo image in the h1 styles.

      hth,
      Rovi
      {{ DiscussionBoard.errors[3509865].message }}

Trending Topics