0
我從get方法URL &接收數據,基於此我想更改標題爲&的元標記圖像。在wordpress中編輯元標記
<meta property="og:title" content="new title" />
<meta property="og:image" content="http://example.com/thumb.jpg" />
我想這個元詳細&刪除頁面的默認元數據。
我從get方法URL &接收數據,基於此我想更改標題爲&的元標記圖像。在wordpress中編輯元標記
<meta property="og:title" content="new title" />
<meta property="og:image" content="http://example.com/thumb.jpg" />
我想這個元詳細&刪除頁面的默認元數據。
在鉤子和函數中使用刪除元標記。
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" />';
}
通過哪個插件生成當前元標記? – Shubham
Meta標籤在Wordpress中不是標準的,所以它們要麼被插件或主題添加。您需要找到它才能更改這些值。 – FluffyKitten