Title: Full width posts
Last modified: August 31, 2016

---

# Full width posts

 *  Resolved [revistataller9](https://wordpress.org/support/users/revistataller9/)
 * (@revistataller9)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/full-width-posts-4/)
 * Hi, I created a child for the Gateway theme and was able to enable the post formats.
   Now I’m trying to edit the CSS in a way my image posts use a full width template.
   I already read A LOT of threads here and in other forums but the solutions they
   post there don’t work for me. At this point I should say I know NOTHING about
   coding so, if you are kind to provide me with full specifications on how to achieve
   this, it would be much appreciated.
 * Thanks in advance!
 * PD: here’s a[ link to my website ](http://www.taller-9.com.ar), and here is a
   link to an[ image post ](http://www.taller-9.com.ar/gabo-duran/)

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

 *  Thread Starter [revistataller9](https://wordpress.org/support/users/revistataller9/)
 * (@revistataller9)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/full-width-posts-4/#post-6953329)
 * I´m the Jon Snow of coding
 *  Thread Starter [revistataller9](https://wordpress.org/support/users/revistataller9/)
 * (@revistataller9)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/full-width-posts-4/#post-6953538)
 * As it turns out, the way to achieve this kind of post (I’m talking about regular
   posts here, not a Custom Post), was to add this piece of code to the functions.
   php file on my child theme:
 *     ```
       add_action('template_include', 'load_single_template');
         function load_single_template($template) {
           $new_template = '';
   
           // single post template
           if( is_single() ) {
             global $post;
             // 'cat-1' and 'cat-2' are category slugs
   
             if( has_term('cat-1', 'category', $post) ) {
               // use template file single-template-cat-1.php
               $new_template = locate_template(array('single-template-cat-1.php' ));
             }
   
             if( has_term('cat-2', 'category', $post) ) {
               // use template file single-template-cat-2.php
               $new_template = locate_template(array('single-template-cat-2.php' ));
             }
   
           }
           return ('' != $new_template) ? $new_template : $template;
         }
       ```
   

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

The topic ‘Full width posts’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [full-width](https://wordpress.org/support/topic-tag/full-width/)
 * [full-width posts](https://wordpress.org/support/topic-tag/full-width-posts/)
 * [image-post](https://wordpress.org/support/topic-tag/image-post/)
 * [post format](https://wordpress.org/support/topic-tag/post-format/)

 * 2 replies
 * 1 participant
 * Last reply from: [revistataller9](https://wordpress.org/support/users/revistataller9/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/full-width-posts-4/#post-6953538)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
