SHOW:
|
|
- or go back to the newest paste.
| 1 | <meta property="og:title" content="<?php global $page, $paged; wp_title( '«', true, 'right' ); bloginfo( 'name' ); if ( $paged >= 2 || $page >= 2 ) echo ' » ' . sprintf( __( 'Page %s' ), max( $paged, $page ) ); ?>" /> | |
| 2 | ||
| 3 | <?php if (is_single()OR is_page()) { ?>
| |
| 4 | ||
| 5 | <meta property="og:type" content="article" /> | |
| 6 | <meta property="og:url" content="<?php the_permalink() ?>" /> | |
| 7 | ||
| 8 | <?php }else{ ?>
| |
| 9 | ||
| 10 | <meta property="og:type" content="website" /> | |
| 11 | <meta property="og:url" content="<?php bloginfo('siteurl'); ?>/" />
| |
| 12 | ||
| 13 | <?php } ?> | |
| 14 | ||
| 15 | <meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
| |
| 16 | <meta property="og:description" content="<?php set_meta_description(); ?>" /> | |
| 17 | ||
| 18 | <?php if (is_single()&& has_post_thumbnail()) { ?>
| |
| 19 | ||
| 20 | <meta property="og:image" content="<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 300, 300 ), false, '' ); echo $src[0]; ?>" /> | |
| 21 | <meta property="og:image:width" content="200" /> | |
| 22 | <meta property="og:image:height" content="200" /> | |
| 23 | ||
| 24 | <?php }else{ ?>
| |
| 25 | ||
| 26 | <meta property="og:image" content="<?php bloginfo('siteurl'); ?>/wp-content/themes/MyTheme/images/preview.jpg" />
| |
| 27 | <meta property="og:image:width" content="200" /> | |
| 28 | <meta property="og:image:height" content="200" /> | |
| 29 | ||
| 30 | <?php } ?> |