Title: full width post
Last modified: September 15, 2016

---

# full width post

 *  [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/full-width-post-6/)
 * Hello,
    great theme. I need to show full width posts from a category. I know 
   to manage a child theme and a category template. I just need the CSS that will
   make the trick 🙂

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

 *  Thread Starter [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/full-width-post-6/#post-8185810)
 * OK, I found what I need: I have to change so the theme does not check featured
   image.
 *  Thread Starter [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/full-width-post-6/#post-8186006)
 * But I did not find in content-single.php where to test ???
 *  Thread Starter [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/full-width-post-6/#post-8186187)
 * OK, it comes from the automatic “has-post-thumbnail” class. But how to remove
   this ?
 *  [Siobhan](https://wordpress.org/support/users/siobhyb/)
 * (@siobhyb)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/full-width-post-6/#post-8222551)
 * Hi [@li-an](https://wordpress.org/support/users/li-an/),
 * Apologies for the delay in reply here! The Automattic team were away at our annual
   company retreat last week but we’re back and ready to help now. 🙂
 * To make sure I’m understanding you correctly: Are you trying to display one column
   of posts on your category pages? If so, adding the following custom CSS to your
   child theme’s **style.css** file will do the trick:
 *     ```
       @media only screen and (max-width: 1600px) {
           .category .posts .hentry {
               width: 100%;
           }
       }
       ```
   
 * If I’m misunderstanding your intent, please share a link to your site and the
   specific pages you’re trying to change. I can help out from there.
 *  Thread Starter [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/full-width-post-6/#post-8222676)
 * I try to “hide” the left side – featured image and title – in single post view
   for posts in particular category – well, for a particular tag.
 *  [Siobhan](https://wordpress.org/support/users/siobhyb/)
 * (@siobhyb)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/full-width-post-6/#post-8230538)
 * Thank you for clarifying, [@li-an](https://wordpress.org/support/users/li-an/)!
 * To achieve what you’re after, you’ll first need to add a class to the body of
   your posts so that it’s possible to use custom CSS to target posts in a specific
   category.
 * The first step do this is to set up a child theme.
 * In case you’re unsure, the following guides provide a good introduction to child
   themes, including steps to set one up:
    - [https://codex.wordpress.org/Child_Themes](https://codex.wordpress.org/Child_Themes)
    - [https://wordpress.tv/2015/05/12/kathryn-presner-getting-comfortable-with-child-themes/](https://wordpress.tv/2015/05/12/kathryn-presner-getting-comfortable-with-child-themes/)
 * After you have set up your child theme, copy the following code ([courtesy of Chris Coyier](https://css-tricks.com/snippets/wordpress/add-category-name-body_class/))
   to the child theme’s **functions.php** file:
 *     ```
       add_filter('body_class','add_category_to_single');
       function add_category_to_single($classes, $class) {
         if (is_single() ) {
           global $post;
           foreach((get_the_category($post->ID)) as $category) {
             // add category slug to the $classes array
             $classes[] = $category->category_nicename;
           }
         }
         // return the $classes array
         return $classes;
       }
       ```
   
 * Save your changes and the names of each post’s category will be added as class
   to its body.
 * Next, add the following snippet to your site’s **style.css** file:
 *     ```
       .example.is-singular:not(.home) .site-inner {
           width: 100%;
       }
   
       .example .entry-header {
           display: none;
       }
       ```
   
 * In the above snippet, replace **example** with the specific category your posts
   fall under.
 * Let me know how you get on with those steps or if any questions come up.
 *  Thread Starter [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/full-width-post-6/#post-8230665)
 * Thanks for your quick answer. I will study the code and try to adapt it to my
   child theme.
 *  [Siobhan](https://wordpress.org/support/users/siobhyb/)
 * (@siobhyb)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/full-width-post-6/#post-8233209)
 * Let us know how you get on. 🙂

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

The topic ‘full width post’ is closed to new replies.

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

 * 8 replies
 * 2 participants
 * Last reply from: [Siobhan](https://wordpress.org/support/users/siobhyb/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/full-width-post-6/#post-8233209)
 * Status: not resolved