//remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'add_to_loop' );
function add_to_loop() {
query_posts('post_type=post&posts_per_page=10&orderby=date&order=desc');
while ( have_posts() ) : the_post();
echo '<div class="tcover" style="margin:13px;width:200px;">';
echo '<div class="tthumb" style="height:200px;background:url(';
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), array(200, 200) );
echo $large_image_url[0];
}
echo ');background-position:center;">';
echo '</div>';
echo '<div class="ttitle">';
the_title();
echo '</div>';
echo '</div>';
endwhile;
// Reset Query
wp_reset_query();
/* end */
// pages that have content inside
while ( have_posts() ) : the_post();
get_template_part( 'content', 'page' );
comments_template( '', true );
endwhile;
}
genesis();
add_action( 'genesis_loop', 'add_to_loop' );
function add_to_loop() {
query_posts('post_type=post&posts_per_page=10&orderby=date&order=desc');
while ( have_posts() ) : the_post();
echo '<div class="tcover" style="margin:13px;width:200px;">';
echo '<div class="tthumb" style="height:200px;background:url(';
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), array(200, 200) );
echo $large_image_url[0];
}
echo ');background-position:center;">';
echo '</div>';
echo '<div class="ttitle">';
the_title();
echo '</div>';
echo '</div>';
endwhile;
// Reset Query
wp_reset_query();
/* end */
// pages that have content inside
while ( have_posts() ) : the_post();
get_template_part( 'content', 'page' );
comments_template( '', true );
endwhile;
}
genesis();
No comments:
Post a Comment