Notifications
Clear all

Script How to Delete Category Name in Meta Title?

2 Posts
2 Users
0 Likes
452 Views
ac10hacks
Posts: 5
Topic starter
(@ac10hacks)
Active Member
Joined: 2 years ago

Hello, I want to delete category name in meta title.

Example meta:

..Post Title.. - ..Category Name.. - ..Site Name..

Change to:

..Post Title.. - ..Site Name..

Cant find the code location.

Topic Tags
1 Reply
Robert
Posts: 9912
Admin
(@robert)
Support Team
Joined: 7 years ago

Hi @ac10hacks,

You should put this hook code in the functions.php file of your current active WordPress theme or in the Code Snippets plugin:

add_filter('wpforo_seo_topic_title', 'wpforo_my_custom_seo_topic_title');
function wpforo_my_custom_seo_topic_title( $title ){
if( isset($title[1]) ) unset($title[1]);
return $title;
}
Reply