• I have written a custom homepage template that shows a grid of category names and category icons. I’d like to show the most recent post in each category next to each category name + icon. Here’s the code that gets the category names and icons, how can I modify it to show most recent post for each?

    <?php echo '
    <ul>';
    foreach(get_categories("orderby=name&order=ASC&child_of=32&include=17,20,22,24,26,28,29") as $category) {
        echo '<li class="category-list">'.get_cat_icon("echo=false&cat=".$category->cat_ID).' '.$category->cat_name.'';
    }
    echo '</ul>
    ';
    ?>
  • The topic ‘Modify category loop to show most recent post in each’ is closed to new replies.