Improve fb metadata on blog and screenshot posts

This commit is contained in:
Dan Mills 2017-11-01 22:51:57 -07:00
Родитель 953475f880
Коммит a8d0a0be49
3 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -8,6 +8,11 @@
<meta name="HandheldFriendly" content="True" /> <meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="<?php echo get_bloginfo( 'template_directory' );?>/favicon.png"> <link rel="shortcut icon" href="<?php echo get_bloginfo( 'template_directory' );?>/favicon.png">
<meta property="og:url" content="<?php echo the_permalink(); ?>" />
<meta property="og:type" content="<?php echo $fb_type? $fb_type : "website"; ?>" />
<meta property="og:title" content="<?php echo get_bloginfo('name'); ?>" />
<meta property="og:description" content="<?php echo get_bloginfo('description'); ?>" />
<meta property="og:image" content="<?php echo $fb_image? $fb_image : tpldir() . '/assets/inhuman-logo-2.png'; ?>" />
<?php wp_head();?> <?php wp_head();?>
</head> </head>

Просмотреть файл

@ -25,7 +25,10 @@
?> ?>
<?php wp_enqueue_style('post', get_template_directory_uri() . "/styles/page/single-inhuman_screenshot.css"); ?> <?php wp_enqueue_style('post', get_template_directory_uri() . "/styles/page/single-inhuman_screenshot.css"); ?>
<?php get_header('page'); ?> <?php
$fb_image = get_the_post_thumbnail_url();
include('header-page.php');
?>
<?php wp_enqueue_script('post'); ?> <?php wp_enqueue_script('post'); ?>
<section class="title small"> <section class="title small">

Просмотреть файл

@ -1,5 +1,9 @@
<?php wp_enqueue_style('post', get_template_directory_uri() . "/styles/page/single-post.css"); ?> <?php wp_enqueue_style('post', get_template_directory_uri() . "/styles/page/single-post.css"); ?>
<?php get_header('page'); ?> <?php
$fb_type = "article";
$fb_image = get_the_post_thumbnail_url();
include('header-page.php');
?>
<section class="title small"> <section class="title small">
<div class="title-inner"> <div class="title-inner">