Title: Full-width excerpt image?
Last modified: June 24, 2020

---

# Full-width excerpt image?

 *  Resolved [kevinlambert](https://wordpress.org/support/users/kevinlambert/)
 * (@kevinlambert)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/full-width-excerpt-image/)
 * Is there a way to make the image-portion of a post excerpt entry on the main 
   page take up the full width so it’s all image, no text and the image is as wide
   as the image + text excerpts?
 * Thanks in advance!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/full-width-excerpt-image/#post-13034462)
 * Thanks for using Tracks!
 * Sure, something like this should work pretty well:
 *     ```
       .excerpt-container {
         display: none;
       }
       .excerpt .featured-image {
         position: relative;
         padding-bottom: 30%;
         width: 100%;
       }
       ```
   
 * Please copy & paste the code above into the “Additional CSS” section in the Customizer(
   Appearance > Customize), and it will take effect right away. The `padding-bottom`
   value can be increased to make the images taller.
 *  Thread Starter [kevinlambert](https://wordpress.org/support/users/kevinlambert/)
 * (@kevinlambert)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/full-width-excerpt-image/#post-13036238)
 * Thanks Ben! Is there any to apply this to only posts with no text (or of a certain
   tag/category) rather than globally for all excerpts?
 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/full-width-excerpt-image/#post-13040548)
 * Specific categories is doable. If you can link me to the category you’d like 
   to target, I can provide an updated code snippet.
 * Posts can be targeted individually if they don’t have a Featured Image, but they
   can’t be targeted based on the presence of an excerpt.
 *  Thread Starter [kevinlambert](https://wordpress.org/support/users/kevinlambert/)
 * (@kevinlambert)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/full-width-excerpt-image/#post-13043668)
 * A category would be perfect! I can define a category named ImagesOnly and would
   like for the excerpts to be a full-width featured image only (no text) for that
   specific category.
 * Do you need me to do that and give you a link? Or could you post the code just
   based on the category name?
 * Thanks in advance!
 * Kevin.
 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/full-width-excerpt-image/#post-13049261)
 * The category name is enough. Here’s an updated version of the snippet:
 *     ```
       .category-imagesOnly .excerpt-container {
         display: none;
       }
       .category-imagesOnly.excerpt .featured-image {
         position: relative;
         padding-bottom: 30%;
         width: 100%;
       }
       ```
   
 * This will affect all posts in the imagesOnly page on any archive page they show
   up on including the homepage.
    -  This reply was modified 5 years, 10 months ago by [Ben Sibley](https://wordpress.org/support/users/bensibley/).
    -  This reply was modified 5 years, 10 months ago by [Ben Sibley](https://wordpress.org/support/users/bensibley/).
 *  Thread Starter [kevinlambert](https://wordpress.org/support/users/kevinlambert/)
 * (@kevinlambert)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/full-width-excerpt-image/#post-13051223)
 * The category CSS label had to be all lowercase (to match the slug for it in the
   Categories list) but that worked like a charm.
 * Thanks so much! 🙏
 *  Theme Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/full-width-excerpt-image/#post-13055574)
 * Got it, glad I could help 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Full-width excerpt image?’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/tracks/1.81/screenshot.png)
 * Tracks
 * [Support Threads](https://wordpress.org/support/theme/tracks/)
 * [Active Topics](https://wordpress.org/support/theme/tracks/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/tracks/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/tracks/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/full-width-excerpt-image/#post-13055574)
 * Status: resolved