Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am using Yoast SEO and a custom header.

    this obv means that any code that yoast uses to input all the seo stuff such as title tag and meta description wont be there.

    I solved the title tag by using this code:

    <title><?php
        /*
         * Print the <title> tag based on what is being viewed.
         */
        global $page, $paged;
    
        wp_title( '|', true, 'right' );
    
        // Add the blog name.
        bloginfo( 'name' );
    
        // Add the blog description for the home/front page.
        $site_description = get_bloginfo( 'description', 'display' );
        if ( $site_description && ( is_home() || is_front_page() ) )
            echo " | $site_description";
    
        // Add a page number if necessary:
        if ( $paged >= 2 || $page >= 2 )
            echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
    
        ?></title>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]

    and that seems to work.

    Even though you can do all the testing with dummy content in WordPress, real site data gives you a better visual representation of how these changes will appear on your live site.

    [Moderated – please do not use these forums to promote your own site.]

Viewing 2 replies - 1 through 2 (of 2 total)