Wordpress 从Internet浏览器标题中删除存档文本
我正在尝试从页面的Wordpress 从Internet浏览器标题中删除存档文本,wordpress,woocommerce,wordpress-theming,Wordpress,Woocommerce,Wordpress Theming,我正在尝试从页面的中删除存档文本。我正在使用Wordpress和WooCommerce以及Flatsome主题,但似乎在任何地方的设置中都找不到它 它也在谷歌上显示为“档案”” 比如说 如果你在网络浏览器中查看,它会显示“Dogs Archive”。你需要使用一个插件。你可以试试这个: 安装插件并更改存档设置。如果您使用的是yoast SEO插件,那么最简单的方法就是删除存档字。导航“标题和元->分类->类别” 查找: 替换为: %%term_title%% %%page%% %%sep%% %
中删除存档文本。我正在使用Wordpress和WooCommerce
以及Flatsome
主题,但似乎在任何地方的设置中都找不到它
它也在谷歌上显示为“档案”
”
比如说
如果你在网络浏览器中查看,它会显示“Dogs Archive”。你需要使用一个插件。你可以试试这个:
安装插件并更改存档设置。如果您使用的是yoast SEO插件,那么最简单的方法就是删除存档字。导航“标题和元->分类->类别” 查找: 替换为:
%%term_title%% %%page%% %%sep%% %%sitename%%
或
只需将下面的代码放在theme function.php中
function overwrite_wp_title($title, $sep)
{
// Look for the string " Archives" (note the leading space),
// and strip it out of $title:
return preg_replace("/ Archives/", "", $title);
}
add_filter("wp_title", "overwrite_wp_title", 11, 2);
function overwrite_wp_title($title, $sep)
{
// Look for the string " Archives" (note the leading space),
// and strip it out of $title:
return preg_replace("/ Archives/", "", $title);
}
add_filter("wp_title", "overwrite_wp_title", 11, 2);