• Hi guys,

    I’m currently using the Unstandard theme, and trying to display a list of subposts whenever someone clicks on a main category link on the left.

    The theme I’m using displays posts in a category in the following manner.
    Click here

    But for the category called ‘Doffo-Notes’ I need to display the sub-categories in a similar fashion as well.

    I have tried using <?php wp_list_categories('child_of=7'); ?> but it will just list one sub-category when there are 3. You can see the effect here.
    Click here

    Here’s the block of code in the category template file I’m using that I think is used to display the posts shown in the first link I mentioned above.

    `<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”post single fix” id=”post-<?php the_ID(); ?>”>

    <div id=”post-<?php the_ID(); ?>” class=”main-post-bg-a showhero”>
    <?php $img_src = get_post_meta($post->ID, ‘lead_image’, true); ?>
    <img src=”<?php bloginfo(‘template_directory’); ?>/scripts/timthumb.php?src=<?php echo $img_src; ?>&w=700&h=0&zc=1″ width=”700″ height=”0″ />
    <div class=”title-insert”>
    <h2></h2>
    </div>
    </div>`

    Please HELP as need to get this done urgently.
    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Kai2810

    (@kai2810)

    Oh anything that may help, here’s the block of code that generates the blog spots to display in the fashion which I want my sub categories to follow.

    Found this in the index.php

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id=”post-<?php the_ID(); ?>” class=”<?php echo ( is_first_post($post->ID) ) ? ‘main-post-bg’ : ‘secondary-post-bg left’; ?>”>

    <?php if ( is_first_post($post->ID) ) $img_src = get_post_meta($post->ID, ‘lead_image’, true);
    else $img_src = get_post_meta($post->ID, ‘secondary_image’, true);
    if ( $img_src == ” ) $img_src = ‘/wp-content/themes/theunstandard/images/theunstandard-blank.png’;
    ?>

    <?php include (TEMPLATEPATH . ‘/includes/index_dynamic.php’); ?>

    <div class=”title-insert”>
    <h3>” rel=”bookmark” title=”<?php the_title(); ?>”><?php the_title(); ?></h3>
    </div>
    </div>
    <?php endwhile; ?>

    Thread Starter Kai2810

    (@kai2810)

    guys…any help please? ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with displaying sub-categories as a list a post’ is closed to new replies.