Title: Styling Loop.php Directly
Last modified: November 12, 2018

---

# Styling Loop.php Directly

 *  Resolved [starwag](https://wordpress.org/support/users/starwag/)
 * (@starwag)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/styling-loop-php-yes-or-no/)
 * I am developing a theme. I would like the loop to behave a certain way stylistically.
   Can I put the html (divs etc.) directly in the loop.php file or should this be
   done on the index.php file only? For example: I have a specified position and
   font I have attached to div1 in my css file. Should I put div1 around the title
   section of my loop.php file, or should I only style this in the index.php file?
    -  This topic was modified 7 years, 7 months ago by [starwag](https://wordpress.org/support/users/starwag/).

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

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/styling-loop-php-yes-or-no/#post-10869973)
 * The loop.php file isn’t a standard one in the [WordPress template hierarchy](https://developer.wordpress.org/themes/basics/template-hierarchy/),
   so there’s a good chance that it’s specific to the theme that you’re using.
 * If it was me, I wouldn’t change the HTML code of the site, I’d add in custom 
   CSS rules so instead of having a style applied to div1 (as per your example) 
   change the CSS to style the element as it stands now instead.
 *  Thread Starter [starwag](https://wordpress.org/support/users/starwag/)
 * (@starwag)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/styling-loop-php-yes-or-no/#post-10872520)
 * I’ll give it a go. Thanks

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

The topic ‘Styling Loop.php Directly’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [loop.php](https://wordpress.org/support/topic-tag/loop-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [starwag](https://wordpress.org/support/users/starwag/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/styling-loop-php-yes-or-no/#post-10872520)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
