Page Titles Changed to H2s
-
The titles were originally H1, but then strangely they switched to H2. I tried to isolate the cause with deactivating/reactivating plugins and themes, but no luck. Is there something I can do to override that change and reset the titles as H1?
I did get this php snippet below, and it does change the page titles back to H1s, but unfortunately, it also changes the menu items too as you can see in this screenshot:?https://workdrive.zohoexternal.com/file/7p7yf3b5bbccb90114c8ab9c0892480461609.
Any ideas about how to edit it so the menu items aren’t changed? Or any other solutions?
—-
function change_page_titles_to_h1($title) {
// Check if it’s a single page or post
if (is_single() || is_page()) {
$title = ‘<h1>’ . $title . ‘</h1>’;
}
return $title;
}
add_filter(‘the_title’, ‘change_page_titles_to_h1’);The page I need help with: [log in to see the link]
- The topic ‘Page Titles Changed to H2s’ is closed to new replies.