• Hello Everyone –

    I need to have a table of contents type of deal on my main blog page. I have been trying to come up with this for a while now but I keep getting the category title above each and every post, not grouped like I am trying do to.

    CATEGORY NAME (#1)
    Post Title
    Post Title
    Post Title…

    CATEGORY NAME (#2)
    Post Title
    Post Title…

    Can anyone share some code on how to do this? I have clearly hit a wall in my thinking.

    My current code:

    <?php if (have_posts()) : while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    
    <h3 style="margin-left:30px; padding-bottom:5px;"><?php the_category(' '); ?></h3>
    
    <h4 class="index" style="margin-left:60px;"><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h1>
    
    <?php endwhile; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Table Of Contents / Post Index Sorted By Category’ is closed to new replies.