Replies
Viewing 4 posts - 1 through 4 (of 4 total)
Actually, I just got this php snippet below, and it does change the page titles, 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?
—-
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’);
I did try this code snippet from another thread I read here, but it didn’t work.
https://workdrive.zohoexternal.com/file/3d6abcc4b030a83b049a0bb440e67b8611154
Viewing 4 posts - 1 through 4 (of 4 total)