Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Start of Open Graph -->
- <?php if (is_home()) { ?>
- <!-- if page is home -->
- <meta property="og:title" content="<?php bloginfo('name'); ?> || Paweł Nowak" />
- <meta property="og:description" content="<?php bloginfo('description'); ?>" />
- <meta property="og:site_name" content="<?php bloginfo('name'); ?> || Paweł Nowak">
- <meta property="og:url" content="<?php bloginfo('url'); ?>"/>
- <meta property="og:type" content="website" />
- <meta property="og:image" content="<?php echo get_template_directory_uri(); ?>/images/LogoHeadGreenBlue.png" />
- <meta property="og:locale" content="pl_pl">
- <?php } if (is_single()) { ?>
- <!-- if is single (post) -->
- <meta property="og:title" content="<?php single_post_title(''); ?>" />
- <meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />
- <meta property="og:site_name" content="<?php bloginfo('name'); ?> || Paweł Nowak">
- <meta property="og:url" content="<?php the_permalink() ?>"/>
- <meta property="og:type" content="article" />
- <meta property="og:image" content="<?php
- global $post;
- $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large' );
- $url = $thumb['0'];
- echo $url;?>" />
- <meta property="og:locale" content="pl_pl">
- <?php } if (is_page()){ ?>
- <!-- if is page -->
- <meta property="og:title" content="<?php wp_title(); ?>" />
- <meta property="og:description" content="<?php echo get_post_meta($post->ID, "description", true); ?> | <?php bloginfo('description'); ?>" />
- <meta property="og:site_name" content="<?php bloginfo('name'); ?> || Paweł Nowak" />
- <meta property="og:url" content="<?php the_permalink() ?>"/>
- <meta property="og:type" content="website" />
- <meta property="og:image" content="<?php echo get_template_directory_uri(); ?>/images/LogoHeadGreenBlue.png" />
- <meta property="og:locale" content="pl_pl">
- <?php } ?>
- <!-- End of Open Graph -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement