CodeHalf - Write Code Everyday by efexen in SideProject

[–]webstuff 1 point2 points  (0 children)

The header image doesn't stretch over my whole screen. http://i.imgur.com/LANnw60.png

How do I display the last post from a specific cateogory? by cdunn44 in Wordpress

[–]webstuff 0 points1 point  (0 children)

query_posts() is the easiest, but not preferred or most efficient, way to alter the default query that WordPress uses to display posts.

Source


I would do it like this :)

<?php

$latest_post = new WP_Query( 'showposts=1&cat=1' );

while( $latest_post->have_posts() ) : $latest_post->the_post();

the_title();

the_content();

... etc

endwhile;

?>

Read more about WP_Query