“…because two bodies, naked and entwined, leap over time, they are invulnerable, nothing can touch them, they return to the source, there is no you, no I, no tomorrow, no yesterday, no names, the truth of two in a single body, a single soul, oh total being…”

Octavio Paz


In this section :


    get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' AND post_status = 'publish' ORDER BY menu_order", 'OBJECT'); if ( $child_pages ) { foreach ( $child_pages as $pageChild ) { setup_postdata( $pageChild ); $thumbnail = get_the_post_thumbnail($pageChild->ID, 'thumbnail'); //var_dump($thumbnail); //if($thumbnail == "") continue; // Skip pages without a thumbnail if ($thumbnail == "") { // Extract the thumbnail from the first attached imaged $allimages =&get_children('post_type=attachment&post_mime_type=image&post_parent=' . $pageChild->ID ); if ($allimages){ foreach ($allimages as $img){ $attachId = $img->ID; $img = wp_get_attachment_image_src( $attachId, array(150,150)); $thumbnail = ""; } } else { $thumbnail = ""; } } //We check if there is any grandchildren pages $childId = $pageChild->ID; $subchild_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$childId." AND post_type = 'page' AND post_status = 'publish' ORDER BY menu_order", 'OBJECT'); ?>
    • ID, 'thumbnail'); if ($thumbnail == "") { // Extract the thumbnail from the first attached imaged $allimages =&get_children('post_type=attachment&post_mime_type=image&post_parent=' . $subpageChild->ID ); if ($allimages){ foreach ($allimages as $img){ $attachId = $img->ID; $img = wp_get_attachment_image_src( $attachId, array(150,150)); $thumbnail = ""; //break; } } else { $thumbnail = ""; } } ?>