Blog Post Titles not appearing?
-
Hi everyone,
This is my first WP site from scratch (not using an already existing theme) and after a few troubles there is only one left. My post titles won’t appear.
Here is the code for my blog.php:
<?php /* Template Name: Blog*/ ?> <?php get_header(); ?> <div id="content"> <?php get_sidebar(); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="maincontent" id="post-<?php the_ID(); ?>"> <?php the_content('Read more »'); ?> <?php comments_popup_link( 'No comments', '1 comment', '% comments', '', ''); ?> <span class="h_blog"> <?php the_title(); ?> </span> </div> <?php endwhile; ?> <?php else : ?> <div class="maincontent"> <h2>Page can not be found!</h2> <p>The article or page that you are trying to reach can not be found. It may have been deleted or moved. Please use the navigation menus or the search box to look elsewhere.</p> </div> <?php endif; ?> <div class="spacer"></div> </div> <?php get_footer(); ?>
and here is the code for my index.php:
<?php /* Template Name: About*/ ?> <?php get_header(); ?> <div id="content"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php get_sidebar(); ?> <div class="maincontent"> <?php the_content('Read more »'); ?> <?php comments_popup_link( 'No comments', '1 comment', '% comments', '', ''); ?> </div> <?php endwhile; ?> <?php else : ?> <div class="maincontent"> <h2>Page can not be found!</h2> <p>The article or page that you are trying to reach can not be found. It may have been deleted or moved. Please use the navigation menus or the search box to look elsewhere.</p> </div> <?php endif; ?> <div class="spacer"></div> </div> <div class="spacer"></div> <?php get_footer(); ?>
Am I missing something (obviously)? I trying taking this code from the default theme, but still didn’t work:
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?>
any help is much appreciated.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Blog Post Titles not appearing?’ is closed to new replies.