Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16421
    mkwan
    Member

    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 http://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.

    #16428
    Sakin
    Keymaster

    @mkwan: I don’t get it why you need to create page template and add additional page for your each category. You can just add your category in your menu from custom menu “Appearance => Menu”. See more details about custom menu at http://catchthemes.com/blog/custom-menus-wordpress-themes/

    #19817

    I need a page template that does not show header or menu, OR one that just doesn’t have the menu, so I can use it with specific pages. How do I go about this?

    #19830
    Sakin
    Keymaster

    @Karen Higginson: I have already replied you in http://catchthemes.com/support-forum/topic/remove-menu-bar-3/. Please don’t post same question twice.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Customized Page Template’ is closed to new replies.