SEOS THEMES

Free WordPress Themes

WordPress head

How to make sure that all pages of the site to take the title of the site and heading replace the page?

 

 

One Comment so far:

  1. I had a similar problem. First in the head part should add the code in title tag.

    wp_title( '|', true, 'right' );

    Then add the following code in function.php.


    function twentyfourteen_wp_title( $title, $sep ) {
    global $paged, $page;

    if ( is_feed() ) {
    return $title;
    }

    // Add the site name.
    $title .= get_bloginfo( 'name', 'display' );

    // Add the site description for the home/front page.
    $site_description = get_bloginfo( 'description', 'display' );
    if ( $site_description && ( is_home() || is_front_page() ) ) {
    $title = "$title $sep $site_description";
    }

    // Add a page number if necessary.
    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
    $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
    }

    return $title;
    }
    add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );

Leave a Reply

^