Galería

[insert_php]
$size = ‘thumbnail’;
$posts_per_page = 12;
$paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1;
$force_pagination = false;

if (!is_paged()) {
$conditions = array(
‘post_type’ => ‘attachment’,
‘posts_per_page’ => $posts_per_page,
‘post_status’ => null,
‘post_mime_type’ => ‘image’,
);
$force_pagination = true;
}
else{
$offset = $posts_per_page*($paged-1);
$conditions = array(
‘post_type’ => ‘attachment’,
‘posts_per_page’ => $posts_per_page,
‘post_status’ => null,
‘post_mime_type’ => ‘image’,
‘offset’ => $offset,
);
}

$images = get_posts($conditions);
foreach($images as $image) {
$attimg = wp_get_attachment_image($image->ID,$size);
$postlink = get_permalink($image->post_parent);

echo ‘‘.$attimg.’‘;
}
if($force_pagination){
echo ‘

‘;
}
else{
echo ‘

‘;
echo ‘

‘;
}
[/insert_php]

Búsqueda por mes:

Categorías

[insert_php]
wp_tag_cloud(‘taxonomy=category&separator= ‘);
[/insert_php]