update wp_options set option_value = replace(option_value,'http://old_domain.com','http://new_domain.com');
update wp_postmeta set meta_value = replace(meta_value,'http://old_domain.com','http://new_domain.com');
update wp_posts set post_content = replace(post_content,'http://old_domain.com','http://new_domain.com');
update wp_posts set guid = replace(guid,'http://old_domain.com','http://new_domain.com');
update wp_posts set pinged = replace(pinged,'http://old_domain.com','http://new_domain.com');
update wp_comments set comment_content = replace(comment_content,'http://old_domain.com','http://new_domain.com');
add_filter('post_thumbnail_html', 'multi_format_thumbnail', 10, 5);
function multi_format_thumbnail( $html, $post_id, $post_thumbnail_id, $size, $attr ){
# Проверяем, что картинка существует
if ($post_thumbnail_id && ! empty( $attachment = get_post( $post_thumbnail_id ) ) ) {
$image="........"
} else {
$image = '<img src="'. get_bloginfo('template_url') .'/assets/images/not-image.jpg" ';
}
return $image;
}
global $wp_query, $paged;
$num_pages = $wp_query->max_num_pages;
if ( is_category() && ! is_paged() ) {
if ( $num_pages > 1)
echo "<link rel=\"next\" href=\"" . get_pagenum_link( $paged + 1 ) . "/page/2\" >\n";
}
if ( is_paged() ) {
echo "<link rel=\"prev\" href=\"" . get_pagenum_link($paged - 1 ) . "\" />\n";
if ( $paged < $num_pages )
echo "<link rel=\"next\" href=\"" . get_pagenum_link( $paged + 1 ) . "\" >\n";
}