Add category to my page template
-
I know, I know this question has been asked before but I cannot find a solution to my problem..
Here is my code or page template
<?php /** * Template Technology Posts * * The magazine page template displays your posts with a "magazine"-style * content slider at the top and a grid of posts below it. * * @package WooFramework * @subpackage Template */ global $woo_options, $post; get_header(); if ( is_paged() ) $is_paged = true; else $is_paged = false; $page_template = woo_get_page_template(); ?> <!-- #content Starts <?php woo_content_before(); ?> <div id="content" class="col-full magazine">--> <div id="main-sidebar-container"> <!-- #main Starts --> <?php woo_main_before(); ?> <section id="main"> <?php woo_loop_before(); // Show page content first /*if (have_posts()) { $count = 0; while (have_posts()) { the_post(); $count++; // Remove post more from page content remove_action( 'woo_post_inside_after', 'woo_post_more' ); // Use business content so we don't output a page title woo_get_template_part( 'content', 'page-template-business' ); // Add post more again add_action( 'woo_post_inside_after', 'woo_post_more' ); } } // Load the Magazine Slider if ( $woo_options['woo_slider_magazine'] == 'true' && ! $is_paged ) { if ( get_option( 'woo_exclude' ) ) update_option( 'woo_exclude', '' ); woo_slider_magazine(); echo '<div class="fix"></div>'; } // Load the magazine grid get_template_part( 'loop', 'magazine' ); woo_loop_after(); */ ?> </section><!-- /#main --> <?php woo_main_after(); ?> <?php get_sidebar(); ?> </div><!-- /#main-sidebar-container --> <?php get_sidebar( 'alt' ); ?> </div><!-- /#content --> <?php woo_content_after(); ?> <?php get_footer(); ?>
What I want to do is put all the posts from category id 2 in this page template. I have tried several different ways with code but with no luck.
I’ve tried
query_post (‘cat=2’);
But it doesn’t work
I want the title if the post to show in an h2 tag, thumbnail if any to show, my author info with date and time, and just the excerpt.
Any help, again sorry for posting about this subject but I can’t find a solution. I would just reference the category page which would resolve my issue but I want a custom sidebar for each of my category pages.
Thanks
Eddie
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Add category to my page template’ is closed to new replies.