Featured images in categories

  • Unknown's avatar

    I added css to make my feature images disappear in the blog posts themselves as I wanted more control over which and where to put images.
    However I would like to add the featured images when clicking on a category and displaying all posts in this category. For now it only shows titles and excerpts but to be more visual I want the feature image to show. Only way I have figured out how to make that happen is to erase the css code I had previously added, but then the feature images show in the blog posts again.
    Is there a way (even if I have to do it manually for each post) to have no feature image in the post, but on the front page and the category listings?

    thank you!

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

  • Unknown's avatar

    To hide the featured images only on your single posts swap your existing rule for the one below:

    .single .entry-thumbnail {
      display:none;
    }
  • Unknown's avatar

    worked like a charm – thanks so much! any advice now on making the image and text box a bit smaller on the category page? or to set a number of posts that should show on each page?

  • Unknown's avatar

    I’m pretty sure the category pages show the same number of posts that you set for your main blog page.

    You can set the image size on just your category archive pages like this:

    .archive.category .entry-thumbnail img {
      height:300px;
      width:auto;
    }

    If you want to make the summary text smaller you can use this code:

    .archive.category .entry-summary p {
      font-size:1em;
    }

    If that’s not what you meant then you’ll need to explain what you meant by “making the … text box a bit smaller”.

  • Unknown's avatar

    that was exactly what i meant you just phrased it a lot nicer :) will try now – thank you!!

  • Unknown's avatar

    worked great – one more question – how can i adjust the size of the titles with the summary text? they look really huge now compared to image and text.

  • Unknown's avatar

    Try this code;

    .archive.category .entry-header h2.entry-title{
       font-size: 2rem; //change this value if you need bigger/smaller size
    }
  • Unknown's avatar

    amazing – thank you so much!!! worked great!

  • The topic ‘Featured images in categories’ is closed to new replies.