Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Jonny Riddel
Jonny Riddel
8,160 Points

Adding Content in Custom Places - Part 2

I know this is probably a simple fix but I can't work it out. I've been following the wordpress theme tutorial and everything has been going well until the very end of this video. It is when you finally get the recent post up with the image on the right side. Instead of having the recent post with one image on the side, all four of the images are shown on the page, and I can't work out how to just have the one image.

http://www.flickr.com/photos/69309748@N08/9160364210/

that is what it looks like and obviously its only supposed to have the one image

2 Answers

Matt Campbell
Matt Campbell
9,767 Points

I think you'll be mending to use posts_per_page but without seeing your code or watching the video I can't be sure.

Jonny Riddel
Jonny Riddel
8,160 Points

well here's the code for front_page.php anyways.

http://www.flickr.com/photos/69309748@N08/9165116596/

I had a look at the posts_per_page to see if I had done something wrong like type 'post_per_page', or leave a comma after the number, but I haven't

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

I just uploaded the source code for this. Try taking a look and see if it solves the problem.

Jonny Riddel
Jonny Riddel
8,160 Points

its ok. i got it to work in the end. i just added a posts_per_page = 1 and that did the trick. thanks anyways