Merge pull request #855 from IanDelMar/header
Conditional pingback & child theme friendliness Thx again @IanDelMar
This commit is contained in:
commit
fecf45dff4
|
@ -18,11 +18,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
<head>
|
<head>
|
||||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="apple-mobile-web-app-title" content="<?php bloginfo( 'name' ); ?> - <?php bloginfo( 'description' ); ?>">
|
|
||||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
|
|
||||||
<?php wp_head(); ?>
|
<?php wp_head(); ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -111,4 +111,24 @@ if ( ! function_exists ( 'understrap_post_nav' ) ) {
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a pingback url auto-discovery header for single posts of any post type.
|
||||||
|
*/
|
||||||
|
function understrap_pingback() {
|
||||||
|
if ( is_singular() && pings_open() ) {
|
||||||
|
echo '<link rel="pingback" href="' . esc_url( get_bloginfo( 'pingback_url' ) ) . '">' . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'understrap_pingback' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add mobile-web-app meta.
|
||||||
|
*/
|
||||||
|
function understrap_mobile_web_app_meta() {
|
||||||
|
echo '<meta name="mobile-web-app-capable" content="yes">' . "\n";
|
||||||
|
echo '<meta name="apple-mobile-web-app-capable" content="yes">' . "\n";
|
||||||
|
echo '<meta name="apple-mobile-web-app-title" content="' . esc_attr( get_bloginfo( 'name' ) ) . ' - ' . esc_attr( get_bloginfo( 'description' ) ) . '">' . "\n";
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'understrap_mobile_web_app_meta' );
|
||||||
|
|
|
@ -17,20 +17,15 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="apple-mobile-web-app-title"
|
|
||||||
content="<?php bloginfo( 'name' ); ?> - <?php bloginfo( 'description' ); ?>">
|
|
||||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
|
|
||||||
<?php wp_head(); ?>
|
<?php wp_head(); ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
<?php get_template_part( 'loop-templates/content', 'blank' ); ?>
|
<?php get_template_part( 'loop-templates/content', 'blank' ); ?>
|
||||||
|
|
||||||
<?php endwhile; // end of the loop. ?>
|
<?php endwhile; // end of the loop. ?>
|
||||||
<?php wp_footer(); ?>
|
<?php wp_footer(); ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Reference in New Issue