1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| $categories= get_categories('child_of=9');
foreach ($categories as $category) {
$option = $category->cat_name;
//echo '<p>'.$option.'</p>';
?><h1><?php echo $option ;?></h1><?php
query_posts(array('post__not_in' => array(145),'category_name' => $option,'post_type'=>'retailers','orderby' => 'date', 'order' => 'ASC' , 'showposts' => $posts));
?>
<?php
if (have_posts()) :
while (have_posts()) : the_post();
the_title();
the_content();
endwhile;
endif;
wp_reset_query();
query_posts(array('post__not_in' => array(145),'category_name' => $option,'post_type'=>'retailers','orderby' => 'date', 'order' => 'ASC' , 'showposts' => $posts));
?>
<h1><?php echo $option ;?></h1>
<?php
if (have_posts()) :
while (have_posts()) : the_post();
the_title();
the_content();
endwhile;
endif;
wp_reset_query();
} |