Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: PageOfPosts2
- */
- /*
- specific for Graphene theme
- */
- global $graphene_settings;
- get_header(); ?>
- $category = get_post_meta($posts[0]->ID, 'category', true);
- $cat = array();
- if( $category ) { $cat = array(get_cat_ID($category)); }
- $showposts = -1; // -1 shows all posts
- $do_not_show_stickies = 1; // 0 to show stickies
- $args=array(
- 'category__in' => $cat,
- 'showposts' => $showposts,
- 'caller_get_posts' => $do_not_show_stickies
- );
- $my_query = new WP_Query($args);
- ?>
- <?php if( $my_query->have_posts() ) : ?>
- <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement