How to create a page temaple with posts

Discussion in 'WordPress' started by cobano, May 9, 2011.

  1. #1
    I want to create page temaple for WP, so in the start of the page there will be all the page content and after that posts from category that I choose.
    I tried to work with http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
    But it's doesn't work so good.

    Here is the code of the page (without any posts):

    <?php get_header(); ?>

    <div id="post-entry">

    <?php $postcount = 1; ?>

    <?php if (have_posts()) : ?>

    <?php include (TEMPLATEPATH . '/headline.php'); ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="post-meta" id="post-<?php the_ID(); ?>">
    <h1><?php the_title(); ?></h1>

    <?php if(function_exists('the_ratings')){ ?>
    <div class="post-author"> <?php the_ratings(); ?></div>
    <?php } ?>

    <div class="post-content">

    <?php the_content(); ?>

    </div>

    </div>

    <?php endwhile; ?>

    <?php /* comments_template(); */ ?>

    <?php include (TEMPLATEPATH . '/paginate.php'); ?>

    <?php else: ?>

    <?php include (TEMPLATEPATH . '/result.php'); ?>

    <?php endif; ?>

    </div>

    <?php include (TEMPLATEPATH . '/right-sidebar.php'); ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>
     
    cobano, May 9, 2011 IP
  2. deepesh2002

    deepesh2002 Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    please try plugin for the post template... there are lots just search... for page there is default where you can change ...
     
    deepesh2002, May 9, 2011 IP
  3. cobano

    cobano Active Member

    Messages:
    271
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #3
    deepesh2002, I know I need to change the default, that why I need the help of the forum...
    Do you know about plugin that can do this thing? I didn't founf anything, that why I posted this thread....
     
    cobano, May 9, 2011 IP
  4. cobano

    cobano Active Member

    Messages:
    271
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #4
    No, It's not that. That just make post template, i'm looking for page template that have regular page things + posts from category that I choose. I added the code of the page.php in my tempalte, I just need few links of code to add posts from category in the page template...
     
    cobano, May 9, 2011 IP