List child page, and make attached picture thumbnail
-
This may be asking too much… but let’s see. This wonderful code here goes and gets the children of a page, and lists the title and attached picture (floated left), as well as the content before the MORE tag, and ends with a beautiful little “read more…” linked to the page.
Question: is it possible to get some code that will print the picture attached (floated left) but in the thumbnail size specified in the media preferences instead of the full size it appears in the page?
thanks
JSC
the code:<?php $args=array( 'post_type' => 'page', 'post_parent' => 93, 'post_status' => 'publish', 'posts_per_page' => -1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { echo 'List of Child Pages for Page ID 93'; while ($my_query->have_posts()) : $my_query->the_post(); ?> <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p> <?php global $more; $more = false; the_content('Read on....'); endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘List child page, and make attached picture thumbnail’ is closed to new replies.