Changing the connector between Site Name and Tagline

Hello,

I’m trying to find how to change the connector (that’s just what I’m calling it because I don’t know the real name) between the site name and tagline. When the site is listed in Google, it shows as:

Site Name - Tagline

I’d like to change the connector to this:

Site Name | Tagline

Any help appreciated!

Hello @filmus,

** Update**
By default the theme uses this: Site Name | Tagline

If you have this : Site Name - Tagline please check if you have a plugin that overwrites it like yoast

Please try adding this code on your child theme functions.php file:

 function x_wp_title_custom( $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( 'pre_get_document_title', 'x_wp_title_custom',99);

Hope this help.

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