• I’ve got a website that appears to be playing up since upgrading to WordPress 3.1.2 and updating the database.

    https://www.harmonyreins.com.au

    Previously I was using the following code to exclude a couple of categories from the main post section:

    <?php query_posts($query_string . '&cat=-10,-12'); ?>

    Tonight I was informed by the client that all of the posts (in this case, the site belongs to an animal shelter, so each post relates to a different animal) are now appearing in the ‘Meet The Gang’ menu section, when the ones in categories ‘Recently Adopted’ and ‘Old Friends’ shouldn’t appear.

    Is this a known issue with 3.1.2? Can anyone see where I might have messed up, or know a fix for this problem?

    Cheers,

    Chris

Viewing 4 replies - 1 through 4 (of 4 total)
  • I have what seems to be a linked issue.
    In a menu, I use:
    wp_list_pages( 'title_li=&include=16,18,20' );

    This menu should list those 3 pages and their children, which is what it used to do, but not anymore.
    Now I need to include the ids of all the children if I want them to show.

    After testing, the same goes for:
    wp_list_categories( 'title_li=&include=5' );
    Used to show the category and its children in the menu, not anymore, unless I include the ids of the children…

    I have the same issue –
    <?php query_posts($query_string . '&cat=-4'); ?>
    is no longer excluding Category ID4 after the upgrade to WP 3.1.2.
    I’m trying workarounds but any help would be appreciated.
    Thanks,
    Ross

    Chris,
    Replace the following in your theme’s index.php

    <?php query_posts($query_string . '&cat=-10,-12'); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

    with

    <?php query_posts('cat=-10,-12'); ?>
    <?php if ( have_posts() ) : while  ( have_posts() ) : the_post(); ?>

    and you should be good.

    Ross

    Thread Starter Chris H

    (@chris-h)

    Ross,

    You, sir, are a superstar! Thank you so much!

    Cheers,

    Chris

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Exclude Categories Malfunctioning’ is closed to new replies.