Issues with Wordpress Loop from sitepoint book 'build your own wicked wordpress theme
Hello, I am very much a newbie to Wordpress and am trying to learn more. At the moment trying to build a child theme for Thematic.
I am working out of Sitepoint book 'build your own wicked wordpress themes' and am having an issue with the setting up a styled index loop for the home page.
In chapter 5.6 the Query_post pulls through 4 posts, one is meant to be styled as a full width feature with thumbnail, the other three styled underneath in box format.
The function pulls through 4 posts fine. But it does not style the image as it should (not floating left), it also creates 2 featured posts, rather than one and it does not pull through the 'read more' function from the parent theme (built on thematic).
If I increase the number of posts being pulled through to 5 then the layout seems OK apart from the extra feature and the thumbnail styling. So I don't think it is simple the CSS that is wrong.
This is the code directly from the support files that come with the book, so you may see why it is particularly frustrating for me as someone trying to learn. I am wondering if the thematic parent theme has been updated since the code was originally written?
The code is:
// Add support for thumbnails
set_post_thumbnail_size(540, 300, true);
add_image_size('homepage-thumbnail', 300, 200, true);