WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] The_Post_Thumbnail in Get_Children Query

[Resolved] The_Post_Thumbnail in Get_Children Query

  • How can I use “the_post_thumbnail” within this “sub-pages” query? it all works great, just need that!

    $postChildren =& get_children( 'post_parent='.$post->ID.'' );
        foreach ($postChildren as $child) {
    print $child->post_title;
    //the_post_thumbnail('thumbnail');
     $explodemore = explode('<!--more-->', $child->post_content);
    echo strip_tags($explodemore[0]) ."<p><a href='$link'>Learn more &raquo;</a></p></div>";

    there’s currently a bit of code pulling huge unscrunched original images in my full version, it appears after the post_title above :

    $childChildren =& get_children( 'post_parent='.$child->ID.'' );
            foreach($childChildren as $newChild) {
    			print "<img src='".$newChild->guid."' height=100 width=100 />";}

    Works great, except for the fact that its gigantic images squeezed without aspect ratio maintennance into 100px square images.

    thank you

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] The_Post_Thumbnail in Get_Children Query’ is closed to new replies.