我想用短码覆盖带有noindex标签的文本块:

我在这里添加了noindex短码:

但当我启动该函数时,文本块就消失了:

我的函数和结果:

发布于 2018-03-27 04:03:15
这段代码应该可以工作。将其添加到您的functions.php文件中,而不是您编写的文件中:
function noindex($content = null)
{
return '<noindex>'.$content.'</noindex>';
}
add_shortcode("noindex", "noindex");https://stackoverflow.com/questions/49499070
复制相似问题