Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.
$parent_title = $page->post_title;
// See if there are any subpages of this page
$subpages = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_parent = '$parent_id'");
if( $subpages > 0 ) {
// Grab the HTML formatted list of subpages
$junk .= wp_list_pages("child_of=$parent_id&depth=$depth&sort_column=menu_order&echo=".(!$return)."&title_li=0");
//Break them into an array of individual lines
$lines = explode("\n", $junk);
$postcount = 0;
echo('<div id="leftcol">');
// Step through the lines and ...
foreach ($lines as $value) {
echo $postcount;
// Isolate just the post-slug-title
$temp = explode("/\" title=\"", $value);
$temptwo = explode("/", $temp[0]);
$size = count($temptwo)-1;
$getme = trim($temptwo[$size]);
$name_or_id = "post_name = '$getme' AND";
// Here we grab post data from the database
$post = $wpdb->get_row("SELECT * FROM $table WHERE $name_or_id post_date <= '$now' AND ($query_suffix) ORDER BY post_date DESC LIMIT 1");
// Display the image from the custom meta field
$currentpostid = $post->ID;
$postmeta = get_post_meta($currentpostid, 'prepic', true);
echo("<img class='mugshot' src='".$blogurl."http://www.e-tv-interactive.com/new/".$postmeta."' />");
// And grab and display the actual title while we are in the neighborhood
$grab = explode("\"", $temp[1]);
echo("<h3>$grab[0]</h3>");
// And echo the post content
echo("<p>");
echo($post->post_content);
echo("</p>");
echo("\n");
// Once we are halfway through the child pages, start the second column
if ($postcount == $size/2) {
echo('</div>');
echo('<div id="rightcol">');
$postcount++;
}
}
echo('</div>');
}
1 to 6 of 6