默认情况下,WordPress的(可视化)编辑器TinyMCE会剥离schema microdata 来自输入。有插件(example) 这将阻止这种行为。或者您也可以通过将此片段添加到functions.php
(docs):
function wpse238918_allow_schema ($in) {
if(!empty($in[\'extended_valid_elements\']))
$in[\'extended_valid_elements\'] .= \',\';
$in[\'extended_valid_elements\'] .= \'@[id|class|style|title|itemscope|itemtype|itemprop|datetime|rel],div,dl,ul,dt,dd,li,span,a|rev|charset|href|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]\';
return $in;
}
add_filter(\'tiny_mce_before_init\', \'wpse238918_allow_schema\' );