• Resolved robertallen

    (@robertallen)


    Hi all,

    How do I get rid of the H1 on index.php page? I don’t even have one…but I’m guessing it’s somewhere in the engine. I tried hiding it in the CSS but it hides the other H1’s. I only want H1 off the index.php page.

    The problem is it’s interfereing with my navigation…
    http://www.robertallenbaker.com/awestar/blog

Viewing 5 replies - 1 through 5 (of 5 total)
  • index.php
    Delete the <h1> tag

    Thread Starter robertallen

    (@robertallen)

    Yep, normally that would work, but the strangest thing is it’s not there.

    This is what I have…no h1 tags…

    <?php
    
      get_header();
    
      if (have_posts()): ?>
    
      <ol id="posts"><?php
    
        while (have_posts()) : the_post(); ?>
    
        <li class="postWrapper" id="post-<?php the_ID(); ?>">
    
          <h2 class="postTitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
          <small><?php the_date(); ?> by <?php the_author(); ?></small>
    
          <div class="post"><?php the_content(__('(more...)')); ?></div>
          <p class="postMeta">Category: <?php the_category(', ') . " " . the_tags(__('Tags: '), ', ', ' | ') . comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')) . edit_post_link(__('Edit'), ' | '); ?></p>
    
          <hr class="noCss" />
        </li>
    
        <?php comments_template(); // Get wp-comments.php template ?>
    
        <?php endwhile; ?>
    
      </ol>
    
    <?php else: ?>
    
      <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    
    <?php
    
      endif;
      ?>
    
      <?php if (will_paginate()): ?>
    
        <ul id="pagination">
          <li class="previous"><?php posts_nav_link('','','&laquo; Previous Entries') ?></li>
          <li class="future"><?php posts_nav_link('','Next Entries &raquo;','') ?></li>
        </ul>
    
      <?php endif; ?>
    
      <?php
      get_footer();
    ?>

    get_header() gets the header.php file — and you do have an h1 tag there:

    <div id="navcontainer">
    	<h1><a href='http://www.robertallenbaker.com/awestar'>AweStar Minitries</a> <span></span></h1>

    Why are you trying to remove it?

    Or is that the one that is “being interfered with?” How so?

    Thread Starter robertallen

    (@robertallen)

    That’s so odd. Well, actually, I just want the h1 tags as titles of the pages and the blog posts, not on the index page.

    I still can’t find it in the header.php. This is the wierdest thing. Is there another header.php with functions?

    Another reason is it’s interfereing with the Navigation bar. I wouldn’t mind keeping it if I could just find it to stylize it with a class selector.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="http://gmpg.org/xfn/11">
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    	<title><?php if(is_home()) bloginfo('name'); else wp_title(''); ?></title>
    
    	<style type="text/css" media="screen">
    		@import url( <?php bloginfo('stylesheet_url'); ?> );
    	</style>
    
        <link rel="stylesheet" type="text/css" href="http://www.robertallenbaker.com/awestar/css/nav.css" />
    
        <link rel="shortcut icon" href="http://www.robertallenbaker.com/awestar/images/favicon.png" />
    
    	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="<?php bloginfo('atom_url'); ?>" />
    
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    	<?php
        wp_get_archives('type=monthly&format=link');
        wp_head();
      ?>
    
    </head>
    
    <body>
    <div id="container">
    
    <div id="header">
    	<div class="logo">
        <a href="http://www.robertallenbaker.com/awestar"><img src="http://www.robertallenbaker.com/awestar/images/logo.png" alt="Awe Star Ministries" border="0" /></a>
        </div>
    	<div id="navcontainer">
    	<?php
            // see this theme's functions.php
            print do_heading();
            print naked_nav($post);
          ?>
    
            <div class="social">
            <img src="http://www.robertallenbaker.com/awestar/images/icon-facebook.png" alt="Facebook" border="0" />
            <img src="http://www.robertallenbaker.com/awestar/images/icon-twitter.png" alt="Twitter" border="0" />
            </div>
        </div>
    </div>
    Thread Starter robertallen

    (@robertallen)

    Hmmm, I guess what I can do is just hide it in the CSS, and unhide the h1’s that I want.

    Thank you guys so much for your answers. Such a crazy thing of the phantom h1 tag. That’s what I get for using a blank wordpress theme sometimes, but it’s a lot easier than configuring something from a blank slate sometimes.

    Appreciate it all!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Get rid of h1 on index page’ is closed to new replies.