• Resolved starwag

    (@starwag)


    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, 6 months ago by starwag.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The loop.php file isn’t a standard one in the WordPress 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

    (@starwag)

    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.