Forums

Help with displaying sub-categories as a list a post (3 posts)

  1. Kai2810
    Member
    Posted 2 years ago #

    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

  2. Kai2810
    Member
    Posted 2 years ago #

    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; ?>

  3. Kai2810
    Member
    Posted 2 years ago #

    guys...any help please? :-(

Topic Closed

This topic has been closed to new replies.

About this Topic