• Resolved Upstream


    Currently, the default Meta Title Tag is: Page/Post title – Site title
    But what if I want this in this form: Page/Post title | Domain.com or Page/Post title I CustomName

    I read here – https://docs.wpslimseo.com/slim-seo/meta-title-tag/ that separator can be changed from – to | using this filter:

    add_filter( ‘document_title_separator’, function() {
    return ‘|’; // Replace with your custom separator.
    } );

    But how to replace ‘Site title’ to CustomWord or Domain.com in the Meta Title Tag. Kindly help me with this.

    Also, do I need to add these filters in the functions.php of the child theme?

    Thank you,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Anh Tran


    Please use this snippet:

    add_filter( 'document_title_parts', function( $parts ) {
        $parts['site'] = 'yourdomain.com';
        return $parts;
    } );
    Thread Starter Upstream


    This worked perfectly well. Super Thanks Tran. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add Domain.com in Meta Title Tag?’ is closed to new replies.