First of all: Great plugin Justin!
However I have a problem with implementing it. Have a function where I call a custom post time, and I want get_the_image() to return the image in stead of printing it directly.
This is my code:
$output = '<ul>'; $args = array( 'post_type' => 'plots', 'posts_per_page' => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); $output .= '<li>'; $output .= get_the_image(array('echo' => 'false')); $output .= '<a href="'; $output .= get_permalink(); $output .= '">'; $output .= get_the_title(); $output .= '</a><br />'.get_the_excerpt().'</li>'; endwhile; $output .= '</ul>'; return $output;
The thumbs are being shown, but unfortunately all together at the beginning of the page, and not as part of the unordered list where I want to have it. Am I doing something wrong or is it the plugin part of ‘echo’ => ‘false’?
- The topic ‘[Plugin: Get the Image] Echo => False seems not to work (WP 3.4)’ is closed to new replies.