Remove Page title separator

Hello there

I have just created a new site and put up a teaser page while the rest is still in development.
According to the client, no title description is needed for the page now so, just a simple title for the page is okay.
So, please I just want to take off the vertical page title separator that comes after the site name in the title bar. ( 808 HUSLA | ). Googling, I know its not advisable or recommended for search engines, and I also know I can change it with wp yoast seo. But however, I still want to remove it completely. If not on the whole site, just for the home page. I cant seem to find a simple way around that.
Please kindly assist me with this.

te site is: clefmullah.com

Hello Mister David,

Please login through FTP then go to wp-content/themes/x-child then add this code to the functions.php

// Filter <title> Output
// =============================================================================

if ( ! function_exists( 'x_wp_title' ) ) :
  function x_wp_title( $title ) {

    if ( is_front_page() ) {
      return get_bloginfo( 'name' ) . ' ' . get_bloginfo( 'description' );
    } elseif ( is_feed() ) {
      return ' | RSS Feed';
    } else {
      return trim( $title ) . ' ' . get_bloginfo( 'name' ); 
    }

  }
  add_filter( 'wp_title', 'x_wp_title' );
endif;

Hope this helps.

1 Like

Worked like magic.

Thanks a lot.

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.