Categories visible on home page

  • Unknown's avatar

    Hi – I’m hoping someone can help me with a bit of code.

    My site has two categories – Wonderland and the Gluten-Free Wonderland.

    It used to be that only Wonderland posts showed up on the home page, and GFW posts only showed when you clicked the GFW menu. But since changing my theme (to twenty sixteen) all posts now appear on the home page.

    As it was someone on here that very kindly provided the code to separate them before, I’m hoping someone could do that again? If this doesn’t make sense please just say!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi Aldo. :)

    The following CSS, which I see you already have in place, should work for your purposes:

    .home article {
    	display: none;
    }
    
    .home article.category-wonderland {
    	display: block;
    }

    If you’re seeing posts that aren’t in the Wonderland category on your home page, let me know the title of the posts and I’ll take another look.

  • Unknown's avatar

    Hello, thanks for replying! I realised that when I changed my theme it wiped the previous code, but found the previous post I’d made on here and just pasted it back in. All sorted :)

  • Unknown's avatar

    Perfect! You know where to find us if anything else comes up, too.

  • The topic ‘Categories visible on home page’ is closed to new replies.