Using a page template to show ‘a page of posts’
-
I would like to use a static front page using wp ‘pages’ and still be able to use the original layout for a page showing my blog posts (i think this would have been index.php).
This is how my page template code looks:
<?php /* Template Name: blog */ ?> <?php global $options; foreach ($options as $value) { if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); } } ?> <?php get_header() ?> <div id="container"> <div id="content"> <?php thematic_navigation_above();?> <?php get_sidebar('index-top') ?> <?php thematic_above_indexloop() ?> <?php thematic_indexloop() ?> <?php thematic_below_indexloop() ?> <?php get_sidebar('index-bottom') ?> <?php thematic_navigation_below();?> </div><!-- #content --> </div><!-- #container --> <?php thematic_sidebar() ?> <?php get_footer() ?>
As lifted from the index.php, so it should show all posts like the default layout did before assigning a static page as my front page. It shows nothing but the title and a comment box.
http://www.marrymeweddingfair.co.uk/pc_newsite/?page_id=22I have tried making a template using the loop from wordpress codex: http://codex.wordpress.org/Pages#A_Page_of_Posts
But this does not have any markup for the css to work. When I try to edit it, I have limited success from hours of trial and error. There must a better solution, maybe using funtions.php, which I have dabbled with, but I found it hard to understand.Thanks in advance for anyone who has read this far, hope I explained this well.
Rob 🙂
- The topic ‘Using a page template to show ‘a page of posts’’ is closed to new replies.