global $post;
$args = array(
'post_type' => 'Results',
'posts_per_page' => -1,
'order' => 'DESC'
);
$myposts = get_posts( $args );
$results = array();
if( $myposts ) {
foreach( $myposts as $mypost ) {
setup_postdata( $GLOBALS['post'] =& $mypost );
$post_data = array();
array_push(
$post_data,
get_the_title( get_the_ID() ), // POST TITLE
get_the_content() // POST CONTENT
);
array_push( $results, $post_data );
}
}
wp_reset_postdata();
if( count($results)> 0 ) {
foreach( $results as $result ) {
?>
echo( '
' . $result[1] . '
' ); ?>
}
} else {
echo( '
COMING SOON!
' );
}
?>