WordPress.org

Ready to get started?Download WordPress

Forums

Exclude subcategories in archives page (4 posts)

  1. houseofstrauss
    Member
    Posted 6 years ago #

    How do I exclude subcategory posts from the main category archive? I saw No-subcats plugin here http://ryowebsite.com/?cat=11 but it doesn't work with 2.5 There must be a code workaround.

    TIA

  2. houseofstrauss
    Member
    Posted 6 years ago #

    When I open a category page, I simply want to see its posts, not the sub-category posts mixed in with it. Can someone show me how to do this please. Hack, plugin, whatever?? (2.5)

    TIA.

  3. houseofstrauss
    Member
    Posted 6 years ago #

    So, here is my archive.php file with modified depth perameter according to codex page here

    '<?php wp_list_categories('depth=1'); ?>'
    Except it still wont't filter out sub-categories on my main categories pages.
    --------------
    '<?php
    /*
    Template Name: Archives
    */
    ?>

    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    <div class="middle">

    <h2>Archives by Month:</h2>

    <?php wp_get_archives('type=monthly'); ?>

    <h2>Archives by Subject:</h2>

    <?php wp_list_categories('depth=1'); ?>

    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>'

    Any help appreciated ... Ver 2.51

  4. tmuka
    Member
    Posted 6 years ago #

    This thread might help...
    http://wordpress.org/support/topic/141648

Topic Closed

This topic has been closed to new replies.

About this Topic