• Resolved Marketing1on1

    (@marketing1on1com)


    Quick question, how can I add a brand name, for example, to the end of the custom meta-data like <title> and <description>?
    For example, let’s say I entered a custom title for the pages “My Custom Title”, how can I add let’s say “| My Brand” to all the pages globally to make it “My Custom Title | My Brand” even though they all have custom meta-data?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @marketing1on1com

    Thanks for reaching out. You may consider using snippet variables in the SEO title field. This will be set in WordPress > Yoast SEO > Search Appearance > Content Types > Posts/Pages

    Thread Starter Marketing1on1

    (@marketing1on1com)

    Hello Maybellyne,
    Those don’t work with the custom titles that I enter on the pages. Those only work if I leave the title and meta description blank for each page and only use snippets.

    Hey @marketing1on1com,

    Thank you for your reply.

    I understand you want to programmatically add | Brandname to your pages even for those that have currently set a custom title already, right?

    We don’t have a feature for this, but you can at any time customize our plugin to fit your needs. For this specifically, I would recommend checking our Metadata API to filter the wpseo_title – see: https://developer.yoast.com/customization/apis/metadata-api/.

    Please understand that we can’t give support on any customization or custom coding.

    Thread Starter Marketing1on1

    (@marketing1on1com)

    For anyone looking to do the same, here is the code to add to your functions.php file:

    add_filter('wpseo_title','update_seotitle');
    function update_seotitle( $ntitle ) {
        return $ntitle. " whatever text you want to add";
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add brand to the end of custom titles’ is closed to new replies.