Advertisement
askwpcoach

Get category & count from theme options

Dec 7th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?php
  2.     //set posts category from theme option
  3.     $YOUR_CATEGORY_IDENTITY = get_option('of_YOUR_CATEGORY_IDENTITY');
  4.     //store value from theme option
  5.     $NUM_VAL = get_option('of_$NUM_VAL');
  6.     query_posts('category_name='.$YOUR_CATEGORY_IDENTITY.'&posts_per_page='.$NUM_VAL.'');
  7.     while (have_posts()) : the_post();
  8. ?>
  9. <!-- Add your content here -->
  10. <?php endwhile;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement