內容簡介
這個外掛非常簡單。使用 WordPress 內建的函數來篩選元素屬性,並添加具有 schema.org 條目屬性的 <meta> 標籤。
請注意,此外掛無法修復編程不良的 WordPress 網站!
在此外掛的首頁上您可以了解更多訊息:itempropWP 專案首頁。
您有如何改善它的好主意嗎?歡迎在此處分享。若有 BUG,也可以在此處回報。
以下為輸出範例:
<span itemscope itemtype="http://schema.org/Article" class="itempropwp-wrap">
<span itemscope itemtype="http://schema.org/Article" class="itempropwp-wrap">
<!-- Itemprop WP 3.5.201610051 by Rolands Umbrovskis https://umbrovskis.com -->
<meta itemprop="name" content="Title of the Article" />
<meta itemscope itemprop="mainEntityOfPage"
itemType="https://schema.org/WebPage"
itemid="http://fulllink.example.com/seo-optimized-article/"/>
<meta itemprop="url" content="http://fulllink.example.com/seo-optimized-article/" />
<span itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="http://fulllink.example.com/seo-optimized-article/example.jpg" />
<meta itemprop="width" content="640"/>
<meta itemprop="height" content="480"/>
</span>
<meta itemprop="author" content="http://fulllink.example.com/author/authorusername/"/>
<meta itemprop="description" content="excerpt from post OR first 170 symbols (with full word), ..." />
<meta itemprop="datePublished" content="2012-09-13 19:17:21"/>
<meta itemprop="dateModified" content="2016-02-15 13:33:25" />
<meta itemprop="interactionCount" content="UserComments:356"/>
<span itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<span itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="http://fulllink.example.com/logo.jpg">
</span>
<meta itemprop="name" content="Example Blog">
</span>
<!-- Itemprop WP 3.5.201610051 by Rolands Umbrovskis https://umbrovskis.com end -->
</span>
評論
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<meta itemprop="name" content="Item Title is greate!" />
<meta itemprop="author" content="Rolands Umbrovskis" />
<meta itemprop="datePublished" content="2011-03-25" />
<span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content = "1"/>
<meta itemprop="ratingValue" content="4.5" />
<meta itemprop="bestRating" content="5" />
</span>
<span itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing">
<meta itemprop="name" content="Item Title" />
</span>
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="Item Title" />
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="price" content="55.36" />
<meta itemprop="priceCurrency" content="USD" />
<link itemprop=
外掛標籤
開發者團隊
② 後台搜尋「itemprop WP for SERP/SEO Rich snippets」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
This plugin is very simple. Using WordPress built in function to filter element attributes and adding < meta > tags with schema.org item properties.
This plugin will NOT FIX BADly programmed WordPress sites!
Project itempropWP homepage
Have a good idea for improvement? Share it | BUG report
Example output:
Review
How does it work?
This assumes that Your page is not fully integrated with HTML5’s data properties for microdata. This plugin will create small code inside Your full content, with extra microdata from schema.org. This will be ONLY on singular pages – post, page or your custom post type.
Once we are on singular page:
we will extract from it EXCERPT.
If You haven’t provided excerpt, plugin will look-up for post content, and downsize it to 170 symbols up to full word.
If your content consist ONLY of shortcode, it will strip it out, and leave empty content. 🙁
If we have empty content, from previous step, we will use post title. Not best choice, but at least we have some description.
If Your post do not have even title, plugin will give up and your description will be empty. (This is very bad :’) )
Other options, like datePublished, dateModified (if enabled), UserComments (if enabled), url are taken from post
SMC Facebook
Author’s Facebook page
Development: Github
Developer on twitter @UmbrovskisCom / @SimpleMediaCode
Require PHP at least 5.3
