Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在wordpress中编辑元标记_Wordpress - Fatal编程技术网

在wordpress中编辑元标记

在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

我从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="http://example.com/big.jpg" />';
}
add_action('wp_head','insert_in_head',11);
函数在函数头()中插入函数{
回声';
回声';
}

您是通过哪个插件生成当前元标记的?元标记在Wordpress中不是标准的,因此它们要么是通过插件或主题添加的。您需要找到它才能更改值。