Support » Theme: Mission News » Show Feature image only in specific category Blog & Archives

  • Resolved shahadatctg

    (@shahadatctg)


    Hi,
    In my blog, I turned off the “show feature image” option for the Blog & Archives pages. But for some specific category (two/three category) I want to show the feature image in those specific category archive pages. How to do this?

    • This topic was modified 3 months, 1 week ago by shahadatctg. Reason: Edit Topic Title
Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Thanks for using Mission News!

    This could be done with some custom CSS. Could you link me to the category pages where you DO want the Featured Images to display? I will check it out and give you a code snippet you can use.

    My website is not up and running yet. I am still using the demo contents.
    This is my website address. You can see I have turned off the show feature option for Blog and archive pages. But i want this News and This science category page to show feature images.
    Please let me know.

    NB: I have lost my old account. That’s why commenting with this account. apologies.

    • This reply was modified 3 months, 1 week ago by shahadatbd.
    Theme Author Ben Sibley

    (@bensibley)

    Got it.

    Start by switching the option to show the Featured Images back on, and then add this CSS to your site:

    .blog .featured-image,
    .archive .featured-image {
      display: none;
    }
    .category-3 .featured-image,
    .category-5 .featured-image {
      display: block !important;
    }

    Please copy & paste the code above into the “Additional CSS” section in the Customizer (Appearance > Customize), and it will take effect right away. That will hide the Featured Images on all pages besides the two categories you specified.

    • This reply was modified 3 months, 1 week ago by Ben Sibley.

    But this doesn’t work if I change post preview. You can check now.

    Theme Author Ben Sibley

    (@bensibley)

    Ah okay, try this updated code instead:

    .blog .featured-image,
    .archive .featured-image {
      display: none;
    }
    .category-3 .featured-image,
    .category-5 .featured-image {
      display: inline-block !important;
    }

    Thanks. It’s working. But I think it would be better if there is such an option in the theme setting/customization. So Users can do that without even adding CSS.

    Theme Author Ben Sibley

    (@bensibley)

    Yes, I agree. I will see if a hide/show option for Featured Images can be added into the Edit Category page in a future Mission News update.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.