• Resolved designcode360

    (@designcode360)


    There’s a hyphen appearing after the Title on the homepage, and I’d like to remove that. Should be simple, but when I looked in the header-hooks.php file I didn’t see anything that looked like it might be responsible for this. I only need it removed from the homepage. The template file that it’s using is home.php if that helps.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author ZeeTheme

    (@zeetheme)

    Hello @designcode360,

    Looks like you have changed the theme on your website.

    Switch back to the WhiteDot theme, please.

    Theme Author ZeeTheme

    (@zeetheme)

    If you are talking about the title separator, here is the solution.

    To change the separator in all pages. add this PHP snippet –

    add_filter( 'document_title_separator', 'whitedot_title_separator' );
    function whitedot_title_separator( $sep ) {
    
    	$sep = "|";
    
    	return $sep;
    
    }

    To change the separator in only on your homepage(static). add this PHP snippet –

    add_filter( 'document_title_separator', 'whitedot_home_title_separator' );
    function whitedot_home_title_separator( $sep ) {
    
    	if ( is_front_page() ) {
    		$sep = "|";
    	}
    
    	return $sep;
    
    }

    To change the separator in only the blog home page. add this PHP snippet –

    add_filter( 'document_title_separator', 'whitedot_blog_title_separator' );
    function whitedot_blog_title_separator( $sep ) {
    
    	if ( is_home() ) {
    		$sep = "|";
    	}
    
    	return $sep;
    
    }

    To change the separator in the default blog page(front blog page), add this PHP snippet –

    add_filter( 'document_title_separator', 'whitedot_front_blog_title_separator' );
    function whitedot_front_blog_title_separator( $sep ) {
    
    	if ( is_front_page() && is_home() ) {
    		$sep = "|";
    	}
    
    	return $sep;
    
    }

    If you want to completly remove the separator, just leave the double quote blank like this $sep = "";

    How to add PHP code to WordPress safely – https://whitedot-docs.zeetheme.com/docs/developers/adding-php/

    Thread Starter designcode360

    (@designcode360)

    Thanks. Went a different direction to solve this. But thanks for this backend solution.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing the hyphen from the Title’ is closed to new replies.