【狂人論壇】

 找回密碼
 註冊
搜索

重灌狂人網站:<!-- JSON-LD schema.org -->

5512

主題

1萬

金錢

184

積分

不來恩

積分
184
brian 發表於 2017-12-19 23:30 | 顯示全部樓層 |閱讀模式
<!-- 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  -->

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|聯絡站長|重灌狂人|狂人論壇

GMT+8, 2024-4-23 20:01

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回復 返回頂部 返回列表