Puzzled on error
Posted: Mon Jan 30, 2012 1:15 am
Hi,
I'm using the following code to try and pull the post images from single posts and publish them on a page.
I'm getting the following error though http://the-ephemeral-project.com/lee/ I don't know where I have gone wrong..
Any advice?
I'm using the following code to try and pull the post images from single posts and publish them on a page.
Code: Select all
function photos() {
if (is_page('lee')) return;
global $post;
echo '<div id="photo">';
$the_query = new WP_Query( array (
'category_name' => 'prom',
'numberposts' => 10 ) );
for( $i = 0; $i <= $the_query->post_count; $i++ ):
echo '<div class="col">';
$the_query->the_post();
$image = get_post_meta( $post->ID, 'thesis_post_image', true );
echo '<a href="' . get_permalink() . '">';
echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/lib/scripts/thumb.php?w=200&h=200&zc=1&q=100&src=' . $image . '"/>';
echo '</a>';
echo '<a href="' . get_permalink() . '">';
the_title();
echo '</a>';
echo '</div>';
endfor;
echo '</div>';
}
add_action( 'thesis_hook_before_post', 'photo' );I'm getting the following error though http://the-ephemeral-project.com/lee/ I don't know where I have gone wrong..
Any advice?