|
<!-- JSON-LD schema.org -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>"
},
"headline": "<?php wp_title( '_', true, 'right' ); bloginfo( 'name' ); ?>",
"datePublished": "<?php echo get_the_modified_date( 'Y-m-d' ).'T'.get_the_modified_time( 'H:i:s' ).'+00:00'?>",
"dateModified": "<?php echo get_the_modified_date( 'Y-m-d' ).'T'.get_the_modified_time( 'H:i:s' ).'+00:00'?>",
"author": {
"@type": "Person",
"name": "<?php echo the_author_meta('display_name'); ?>"
},
"description": "<?php
global $post;
if ( is_singular() ) {
if ( $post->post_excerpt ) {
$post_excerpt = $post->post_excerpt;
} else {
$post_excerpt = trim( str_replace( "\r\n", ' ', strip_tags( $post->post_content ) ) );
}
$description = mb_substr( $post_excerpt, 0, 150, 'UTF-8' );
$description .= ( mb_strlen( $post_excerpt, 'UTF-8' ) > 150 ) ? '...' : '';
printf('%s', $description);
} ?>",
"image": {
"@type": "ImageObject",
"url": "<?php the_post_thumbnail_url(); ?>",
"width": "200" ,
"height": 200
},
"publisher": {
"@type": "Organization",
"name": "《重灌狂人》",
"logo": {
"@type": "ImageObject",
"url": "https://briian.com/briian-logo.png",
"width": "300" ,
"height": "300"
}
}
}
</script>
<!-- JSON-LD schema.org END -->
|
|