Category array
-
Hello everyone!
I have created a page to showcase all categories and their respective posts heading and selected image. Now I want to be able to add subcategories to them and these subcategories should not appear on this page. I’ve searched everywhere and tried all solutions I can think of but nothing works! Is there anyone who can help me shine some light on this?
Here is the code I’m using today (without styling):
<?php $cats = get_categories(array('orderby' => 'id', 'order' => 'ASC', 'parent' => '3')); foreach ($cats as $cat) { $cat_id= $cat->term_id; echo "<br clear='all' /><h3>".$cat->name."</h3>"; query_posts("cat=$cat_id&posts_per_page=100&order=asc&orderby=title"); if (have_posts()) : while (have_posts()) : the_post(); ?> <?php ?> <a href="<?php the_permalink();?>"> <?php if ( has_post_thumbnail() ) {the_post_thumbnail('thumbnail');} ?> <?php the_title(); ?> </a> <?php endwhile; endif; ?> <?php } ?>
The page I need help with: [log in to see the link]
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Category array’ is closed to new replies.