Hello,
I would like to hide the vertical bar | that is between the title and the tagline in all the pages of my website. I tried to go on the settings and I cannot find an option to remove it. How can I do that with a css code ?
Thank you!
Nobody?
Hey!
Please add following code to Functions.php file in Appearance > Editor
add_filter('avf_title_tag','my_new_tag_filter');
function my_new_tag_filter()
{
$title = get_bloginfo('name').' - ';
$title .= (is_front_page()) ? get_bloginfo('description') : wp_title('', false);
return $title;
}
You can simply remove the dash if you would not like to display it
Regards,
Yigit
How to I “simply remove” the dash? I cannot find it in the options… The code you gave me did not change anything.
Hi!
Use following code instead
add_filter('avf_title_tag','my_new_tag_filter');
function my_new_tag_filter()
{
$title = get_bloginfo('name').' ';
$title .= (is_front_page()) ? get_bloginfo('description') : wp_title('', false);
return $title;
}
Best regards,
Yigit
When I add the code to functions.php the website stopped working and I had to change the file form the FTP server to make it work again. I can’t believe it is so complicated just to remove the dash in the page title…. Is there not any options in the settings to remove it ???
Hey!
You can simply use a plugin such as this one – https://wordpress.org/plugins/wordpress-seo/ to have more control over your page titles.
Cheers!
Yigit