Categories

Featured templates

WordPress. How to remove “|” sign from pages browser titles

Margarett Ortiz April 20, 2015
Rating: 5.0/5. From 1 vote.
Please wait...

This tutorial shows how to how to remove “|” sign from pages browser titles in WordPress.

WordPress. How to remove “|” sign from a site/pages title

  1. In order to remove “|” sign from a site/pages title, please log into your WordPress admin section.

  2. Navigate to Appearance->Editor and on the right look for: header.php file. In case this file is not present at wp-content/themes/themeXXXXX folder, just copy it from wp-content/themes/CherryFramework directory and edit then:

    Wordpress.How_to_remove_sign_from_a_sitepages_title_1

  3. Open header.php file and look for this code:

    <title><?php if ( is_category() ) {	
    echo theme_locals("category_for")." &quot;"; single_cat_title(); echo '&quot; | '; bloginfo( 'name' );
    } elseif ( is_tag() ) {
    echo theme_locals("tag_for")." &quot;"; single_tag_title(); echo '&quot; | '; bloginfo( 'name' );
    } elseif ( is_archive() ) {
    wp_title(''); echo " ".theme_locals("archive")." | "; bloginfo( 'name' );
    } elseif ( is_search() ) {
    echo theme_locals("fearch_for")." &quot;".esc_html($s).'&quot; | '; bloginfo( 'name' );
    } elseif ( is_home() || is_front_page()) {
    bloginfo( 'name' ); echo ' | '; bloginfo( 'description' );
    }  elseif ( is_404() ) {
    echo theme_locals("error_404")." | "; bloginfo( 'name' );
    } elseif ( is_single() ) {
    wp_title('');
    } else {
    wp_title( ' | ', true, 'right' ); bloginfo( 'name' );
    } ?></title>
    

    Wordpress.How_to_remove_sign_from_a_site_pages_title_2

  4. You can remove “|” sign from every code line there, so it will not be shown on any page of your site.
    If you want to delete it only from site title, then you have to delete it from this line:

      } elseif ( is_home() || is_front_page()) {
    bloginfo( 'name' ); echo ' | '; bloginfo( 'description' ); 

    between

     echo

    and

     bloginfo( 'description' ); 

    you see “|” sign that has to be removed, then the code will look as follows:

     } elseif ( is_home() || is_front_page()) {
    bloginfo( 'name' ); echo ' '; bloginfo( 'description' );
    

    Wordpress.How_to_remove_sign_from_a_sitepages_title_3

Feel free to check the detailed video tutorial below:

WordPress. How to remove “|” sign from a site/pages title

Responsive Design Wordpress Templates
This entry was posted in WordPress Tutorials and tagged browser, page, title, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket