Forum Replies Created

Viewing 16 replies (of 16 total)
  • Forum: Plugins
    In reply to: Sub Categories Links
    Thread Starter gward1

    (@gward1)

    I found this code on a different website and it seems to be doing what I want with a few exceptions.

    [code]
    <?php

    // outputs subcategories in same way, if there are any (if you're browsing a parental category)

    $has_children = (bool)(get_category_children(intval(get_query_var('cat'))));

    if (is_category() AND $has_children) {
    wp_list_categories('title_li=<h2>Alphabetical Listing of Artists</h2>&child_of=' . intval(get_query_var('cat')));
    }

    ?>
    [/code]

    However it puts a bullet next to the title_li, which I don’t want because it looks weird. You can see what I mean on this page: http://www.songlyricsx.com/lyrics/a/.

    Here’s the code for the posting part which is displayed above the current subcategories:

    [code]
    <div class="middle">

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div id="post-<?php the_ID(); ?>">
    <h2>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2>
    <p><small><?php the_time('F jS, Y') ?> <?php the_author() ?></small> Posted in <?php the_category(', ') ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', '', ' | '); ?> <?php if(function_exists('the_views')) { the_views(); } ?></p>

    <div class="entry">
    <?php the_content('Read the rest of this entry »'); ?>
    </div>

    <!-- AddThis Bookmark Post Button BEGIN -->
    <?php echo "<div class=\"addthis\"><img src=\"http://s9.addthis.com/button1-bm.gif\" width=\"125\" height=\"16\" border=\"0\" alt=\"AddThis Social Bookmark Button\" /></div>"; ?>
    <!-- AddThis Bookmark Post Button END -->
    [/code]

    How do I modify this so that if it’s a parent category no post is shown and if it’s a child category it shows the posts? Thanks!

Viewing 16 replies (of 16 total)