• my post will show up but not the post title
    here is my code:

    <?php get_header(); ?>
      <div id="content">
      <div id="main">
       <?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
                                    <div id="poststyle">
    				<h2 class="post"><?php the_title(); ?></h2>
    
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>
    
    			<!--<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>-->
    			</div>
    </div><!-- end poststyle -->
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    
    	<?php endif; ?>
      </div><!-- end main -->
    
      <div id="sidebar">
    <?php get_sidebar(); ?>
      </div><!-- end sidebar -->
    </div><!-- END CONTENT -->
    <?php get_footer(); ?>

    the css

    h2.post {font-size:15px; text-align:left; margin-left:3px;border-bottom:1px solid #c0c0c0}
    h3 {font-size:14px;border-bottom:1px solid black; width:631px; text-align:right}
    h6 {font-size:10px;margin:0px;padding:0px; font-weight:normal;display:inline;line-height:10px}
    
    .sidebarList {text-align:left; margin-left:-10px}
    
    #poststyle {}
    .entry {margin-left:10px;}

    I have tried in both IE8 and chrome, nothing! Thanks for the help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • I don’t see anything wrong in your code. Can you post a link to your site?

    Thread Starter xmatter

    (@xmatter)

    You blog title is been commented out: <!--<h2 class="post">test</h2>-->

    Check your code again.

    Thread Starter xmatter

    (@xmatter)

    it has been commented out on the index.php but i am using a page template (blog.php) where it is identical except the h2 post is not commented out.

    The default blog post list uses index.php. Page templates are for pages. Check out Template Hierarchy for more info on this.

    Thread Starter xmatter

    (@xmatter)

    Thanks for your help and i will fix what i have done. But i commented out the blog title (on index) because i do not want the page title’s to show on every single page. I only want the blog post title to appear on the blog page for all posts. So… i created a replica of the index and uncommented the h2 post and name it (blog.php) and that is used as the page template for the blog page. It there a way to do this with out having to do what i explained?

    Thread Starter xmatter

    (@xmatter)

    i get it. so i should create a page template reflecting the commented out h2 post and that will fix my issue.

    You should comment out the title for single.php instead. That’s the file used to display blog posts when viewing them individually.

    Remember that post and page are two different things in wordpress. index.php is used to display all and single.php for individual post.

    Thread Starter xmatter

    (@xmatter)

    i do not have a single.php file but will look into creating one. For now, i have created a page template commenting out the desired info and it all works as wanted. I truly appreciate your help!

    You’re welcome.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘post title not showing’ is closed to new replies.