mirror of https://github.com/vtrois/kratos
Update header.php
parent
f170b64688
commit
6d3b678ce3
11
header.php
11
header.php
|
@ -12,8 +12,8 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title><?php wp_title('-', true, 'right'); ?></title>
|
<title><?php wp_title('-', true, 'right'); ?></title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||||
<meta name="format-detection" content="telphone=no,email=no">
|
<meta name="format-detection" content="telphone=no, date=no, address=no, email=no">
|
||||||
<meta name="theme-color" content="<?php echo kratos_option('g_chrome', '#282a2c'); ?>">
|
<meta name="theme-color" content="<?php echo kratos_option('g_chrome', '#282a2c'); ?>">
|
||||||
|
|
||||||
<meta name="keywords" itemprop="keywords" content="<?php echo keywords(); ?>">
|
<meta name="keywords" itemprop="keywords" content="<?php echo keywords(); ?>">
|
||||||
|
@ -21,13 +21,14 @@
|
||||||
<?php $ogImageUrl = is_home() || !have_posts() ? kratos_option('seo_shareimg', ASSET_PATH . '/assets/img/default.jpg') : share_thumbnail_url(); ?>
|
<?php $ogImageUrl = is_home() || !have_posts() ? kratos_option('seo_shareimg', ASSET_PATH . '/assets/img/default.jpg') : share_thumbnail_url(); ?>
|
||||||
<meta itemprop="image" content="<?php echo $ogImageUrl; ?>">
|
<meta itemprop="image" content="<?php echo $ogImageUrl; ?>">
|
||||||
|
|
||||||
|
<?php $isPostsIndexAsHome = is_home() && !is_front_page() ?>
|
||||||
<meta property="og:site_name" content="<?php bloginfo('name'); ?>">
|
<meta property="og:site_name" content="<?php bloginfo('name'); ?>">
|
||||||
<meta property="og:url" content="<?php echo is_home() ? the_permalink() : get_site_url(); ?>">
|
<meta property="og:url" content="<?php echo $isPostsIndexAsHome ? get_site_url() : the_permalink(); ?>">
|
||||||
<?php $title = is_home() ? get_the_title() : get_bloginfo('name'); ?>
|
<?php $title = $isPostsIndexAsHome ? get_bloginfo('name') : get_the_title(); ?>
|
||||||
<meta property="og:title" content="<?php echo $title; ?>">
|
<meta property="og:title" content="<?php echo $title; ?>">
|
||||||
<meta property="og:type" content="article">
|
<meta property="og:type" content="article">
|
||||||
<?php
|
<?php
|
||||||
if (!is_home()) {
|
if (!$isPostsIndexAsHome) {
|
||||||
$tags = get_the_tags();
|
$tags = get_the_tags();
|
||||||
if (is_array($tags)) {
|
if (is_array($tags)) {
|
||||||
foreach ($tags as $tag) { ?>
|
foreach ($tags as $tag) { ?>
|
||||||
|
|
Loading…
Reference in New Issue