Site icon Catch Themes

Customized Page Template

I want to have a page for each of my post categories, displaying each post as would be with the blog template (excerpt view, chronological order). For example, all my recipe posts will be listed when you click 'Recipes' on the main navigation menu, similar to how my blog posts are listed when you click 'Blog'. I've tried using the following code in creating a new page template with no success: <?php /* Template Name: ListPostsInCategoryThatHasSameNameAsPage */ ?> <?php get_header(); ?> <div id="content"> <div id="main"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> <?php endwhile; else: endif; ?> <?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1>"><?php the_title(); ?></h1> <p><?php the_content(); ?> <?php endwhile; else: endif; ?> </div> </div> <?php get_footer(); ?> My site is www.beautyinthebackcountry.com. Can you please help me with figuring out the code for a customized page template? Perhaps it's easier to edit the Blog Page Template.php? Any help will be GREATLY appreciated.
Exit mobile version