[Resolved] automatic changes to content in – can they be overridden?

Home Forums Support [Resolved] automatic changes to content in – can they be overridden?

Home Forums Support automatic changes to content in – can they be overridden?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #694681
    Maxwell

    I see “GP doesn’t do anything title tag or description meta related” so maybe the following problems are caused by WordPress, but any help would be appreciated.

    For my front page, text placed in the Customize > Site Identity > Tagline field is automatically appended to the site header title and inserted into the <title> within the <head>. (1) Is there a way to keep the Tagline (description) out of that?

    For my second page, text placed in the Pages > Edit Page > “Enter title here” field gets automatically prepended to the site header title and placed in the <title> in the <head> of that page. (2) Is there a way to keep the site header title out of that page’s title?

    (3) Does it affect SEO to check the “Hide site title” and “Hide site tagline” boxes in the Site Identity?

    Thanks for any help!

    GP Premium 1.7.2
    #694801
    David
    Staff
    Customer Support

    Hi there,

    an SEO plugin like Yoast will allow you to amend the SEO Title – so you can choose which tags are used or manually overwrite them.

    #695159
    Maxwell

    Thanks, I particularly don’t want to use Yoast. If I made the change with the GP HTML editor, will my change be reversed automatically at some unpredictable time, since the error occurred automatically (I don’t know whether by the WP core or by GeneratePress)?

    Thanks!

    #695351
    David
    Staff
    Customer Support

    OK, so lets use this filter:

    add_filter( 'document_title_parts', function( $title )
    {
        if ( is_home() || is_front_page() )
            unset( $title['tagline'] ); /** Remove tagline */
    
        if ( is_single() )
            unset( $title['site'] ); /** Remove site name */
    
        return $title;
    
    }, 10, 1 );
    #695746
    Maxwell

    Thank you tons!

    #695845
    David
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.