在wordpress中编辑元标记
我从get方法URL接收数据&基于此,我想更改title和image的meta标记在wordpress中编辑元标记,wordpress,Wordpress,我从get方法URL接收数据&基于此,我想更改title和image的meta标记 使用下面的钩子和函数删除元标记 add_action( 'wp_head', 'insert_in_head', 11 ); function insert_in_head(){ echo '<meta property="og:title" content="new title tag" />'; echo '<meta property="og:image" content="htt
使用下面的钩子和函数删除元标记
add_action( 'wp_head', 'insert_in_head', 11 );
function insert_in_head(){
echo '<meta property="og:title" content="new title tag" />';
echo '<meta property="og:image" content="http://example.com/big.jpg" />';
}
add_action('wp_head','insert_in_head',11);
函数在函数头()中插入函数{
回声';
回声';
}
您是通过哪个插件生成当前元标记的?元标记在Wordpress中不是标准的,因此它们要么是通过插件或主题添加的。您需要找到它才能更改值。