• mStudios

    (@mstudios)


    I’m trying to NOT show category 12 – I’ve tried working with the “front-page-cat” plugin, but it bogs on me when I’m trying to assign many categories to show. Much easier for me would be to just eliminate 1 category from the front page. Is there a way to do that?

Viewing 6 replies - 1 through 6 (of 6 total)
  • ColdForged

    (@coldforged)

    Thread Starter mStudios

    (@mstudios)

    Great! I did do a search here but did not have the bright idea to check there too 😉

    This forum is great. Thanks!

    neetij

    (@neetij)

    If you don’t want to use my-hacks, you can use code like below in your index.php:
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php if ( !in_category('12') { ?>
    // the Loop code
    `<?php } ?>

    Thread Starter mStudios

    (@mstudios)

    Neat, thanks. Yes, I rather wanted to avoid the legacy my-hacks.php file. I had tried adding the code to the index file before seeing your post but had tried it to put it just above the get header info which didn’t work 🙂 I do assume it should read minus, i.e. -12 to omit that category.

    moshu

    (@moshu)

    Nope, not minus. the [!] means NOT in front of in_category.

    Thread Starter mStudios

    (@mstudios)

    of course! thanks for the explanation.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How can I eliminate 1 category from showing on the front page?’ is closed to new replies.