Excluding Categories from Main Page?

Viewing 2 posts - 1 through 2 (of 2 total)
  • #13011
    ethanjrt
    Participant

    I’d like to exclude certain categories of posts from my main page. I’ve been searching around for hours looking for solutions to this, but none of the snippets of code I’ve seen other people adding to their index.php files actually works for me. The closest I came was adding

    ?php if ( is_home() )
    {global query_string; query_posts( $query_string . ‘&cat=-14,-15’); }?

    (tag brackets removed because they weren’t displaying properly here)

    to index.php (in my child theme) right before the loop, BUT then the stickied posts (which are supposed to only appear on the slider) start showing up at the top (as if also “stickied” regularly). How can I avoid this?

    Cheers,
    ~Ethan

    #13013
    ethanjrt
    Participant

    Update: Turns out the plugin Simply Exclude is much more efficient than Me Playing With Code I Don’t Understand. Solves the issue without creating any new problem with the slider, stickied post, OR pagination. I’m leaving this topic up here so that it’s searchable for anyone else who might have the same issue in the future.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.