Hi! I’d like the <title> to always show just the website name, without the page name. Is there a way to do it in child theme without messing with future enfold/wordpress updates?
running version 4.0.7 on wp 4.8
thanks!
Hey 0_o,
The Site Name | Page Name comes from the [title] in your header.php.
To remove you have two options:
1) Edit the header.php directly and save as a copy in your child theme.
2) Use a plugin like WordPress SEO or All In One that rewrites a page’s title to whatever you want.
Hope this helps!
Best regards,
Mike
Do I need to copy the whole header.php to the child theme folder or just create a blank file and add the lines I want to change?
I can’t find any mention of the word “title” in header.php
Hi,
Please add following code to Functions.php file in Appearance > Editor
add_filter('avf_title_tag','avia_new_title');
function avia_new_title() {
$title = get_bloginfo('name');
return $title;
}
Best regards,
Yigit
Didn’t make any difference, I also tried to do
$title = “TEST”;
And it didn’t change the title.
I’m running the latest WordPress with Enfold 4.0.7 with child theme.
Just to make sure I was clear (sorry for my English), I’m trying to have the site name as the title on all inner pages, without showing the page name in the title.
Thanks for all your help!
Hi,
Please consider using a plugin such as – https://wordpress.org/plugins/wordpress-seo/
Best regards,
Yigit