Advertisement
Guest User

Untitled

a guest
Jan 17th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: PageOfPosts2
  4. */
  5. /*
  6. specific for Graphene theme
  7. */
  8. global $graphene_settings;
  9. get_header(); ?>
  10.  
  11. $category = get_post_meta($posts[0]->ID, 'category', true);
  12. $cat = array();
  13. if( $category ) { $cat = array(get_cat_ID($category)); }
  14.  
  15. $showposts = -1; // -1 shows all posts
  16. $do_not_show_stickies = 1; // 0 to show stickies
  17. $args=array(
  18. 'category__in' => $cat,
  19. 'showposts' => $showposts,
  20. 'caller_get_posts' => $do_not_show_stickies
  21. );
  22. $my_query = new WP_Query($args);
  23.  
  24. ?>
  25.  
  26. <?php if( $my_query->have_posts() ) : ?>
  27.  
  28. <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement