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

Seemingly Simple Coding Question

Can anyone figure out how to migrate this code into Wordpress? Not sure how you're supposed to show relative images here, but it's just three boxes and a background image that takes up the whole page. Doesn't seem to be playing nicely with Wordpress:

http://codepen.io/tpicks/pen/gFndj

If there's a way to add the pics, let me know.

3 Answers

Anthony Hind
Anthony Hind
5,715 Points

Not sure if I am misunderstanding your request but are you trying to put background images into your page if so I would normally use the CSS to do this.. at the moment you are calling the images via your HTML also in your links to your images you don't appear to have a path direct to the source file ../wp-content/images/square.jpg or something of the sort.

Hope this helps

Ant

Matt Campbell
Matt Campbell
9,767 Points

You have to conform to the WordPress way of doing things. Read the WordPress codex. WordPress works slightly differently to writing a page normally.

Anthony - normally, yes, I'd use CSS for background images, but for some reason, this method works.