Advertisement
Deeproad

Wordpress meta tag

May 16th, 2014
1,524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <title><?php global $page, $paged; wp_title( '&laquo;', true, 'right' ); bloginfo( 'name' ); if ( $paged >= 2 || $page >= 2 ) echo ' &raquo; ' . sprintf( __( 'Page %s' ), max( $paged, $page ) ); ?></title>
  2.  
  3. <meta name="description" content="<?php set_meta_description(); ?><?php if ( $paged < 2 ) { } else { echo (' Pagina '); echo ($paged); } ?>" />
  4.    
  5. <?php if (is_single()&& has_post_thumbnail()) { ?>
  6.  
  7.   <link rel="image_src" href="<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 150, 150 ), false, '' ); echo $src[0]; ?>" />
  8.  
  9. <?php }else{ ?>
  10.    
  11.   <link rel="image_src" href="<?php bloginfo('siteurl'); ?>/wp-content/themes/MyTheme/images/preview.jpg" />
  12.  
  13. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement