Posts going to index.php instead of custom template
-
I have a couple custom templates for a site I am building and using a static page for home, and custom template for blog posts page. The post page is set in ‘reading’ settings, but the posts display using index.php. Here is the code of the template I want to use for the posts page. Any thoughts? Thank you!
<?php/*Template Name: Blog Page*/?> <?php get_header(); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"><!--start post--> <h2><?php the_title(); ?></h2> <div id="main_full" class=" clearfix"><!--start main--> <div id="top_bar"><h3 class="gallery-title"><span>otto</span>williams | community | news</h3></div> <div id="blog_page"><!--start blog page--> <div class="entry"><!--start entry--> <?php the_content(); ?> </div><!--end entry--> </div><!--end blog page--> </div><!--end main--> <?php endwhile; endif; ?> <?php get_sidebar(); ?> </div><!--end post--> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?> <?php comments_template(); ?> <?php get_footer(); ?>
Viewing 15 replies - 1 through 15 (of 15 total)
Viewing 15 replies - 1 through 15 (of 15 total)
- The topic ‘Posts going to index.php instead of custom template’ is closed to new replies.