Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Ahmed Hassan
Ahmed Hassan
5,533 Points

Can I change the HTML of a WordPress theme?

Hey Zac, Can I change the HTML of a WP theme that I installed to my website? I mean, the installed theme gives only 4 divs that show my skills set.. I want it to show 5 or 6 divs while the customizer only allows me to edit the default 4 divs.

Any ideas?

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi Ahmed,

Typically the HTML will be embedded into PHP files and mixed in with php functions and the WordPress loop but if you know what you're doing you can go into any template file and make changes to the HTML and CSS.

Most WordPress themes

  • are developed as static HTML files
  • Copied into php files
  • and depending on how far you go in your WordPress development, copied into further more specific templates

The CSS is normally kept in a single CSS file.

So as long as you know where to make changes that doesn't break the php functions and loop you can make all the changes you want to the HTML.

Hope this helps :)

Ahmed Hassan
Ahmed Hassan
5,533 Points

Jonathan,

Thanks for the detailed answer :)