1

SEOMatic automatically adds the siteName after your title tag, which seems smart, but I don't think it's necessary for social sharing. Is it possible to tweak the og:title and twitter:title tag output in SEOmatic to remove the siteName?

My current seomaticMeta array looks like this:

{% set seomaticMeta = { 
  seoTitle: entry.title,
  seoDescription: entry.shortDescription,
  seoImage: entry.thumbnailImage.first(),
  seoKeywords: '',
  canonicalUrl: entry.url,
  twitter: { 
      card: seomaticMeta.twitter.card,
      site: seomaticMeta.twitter.site,
      creator: seomaticMeta.twitter.creator,
      title: entry.title,
      description: entry.shortDescription,
      image: entry.thumbnailImage.first(),
  },
  og: { 
      type: seomaticMeta.og.type,
      locale: seomaticMeta.og.locale,
      url: entry.url,
      title: entry.title,
      description: entry.shortDescription,
      image: entry.thumbnailImage.first(),
      site_name: seomaticMeta.og.site_name,
      see_also: seomaticMeta.og.see_also
  }
} %}

However, the entry.title tag returns the title with the siteName appended.

1
  • 1
    Try {% set seomaticSiteMeta = seomaticSiteMeta | merge({'siteSeoTitlePlacement': 'none'}) %} Commented Jul 18, 2017 at 1:57

1 Answer 1

2

Yes, it's definitely possible to do that, but you'll need to use Twig as per: https://github.com/nystudio107/seomatic/wiki/10.-Dynamic-Twig-SEO-Meta

However, you might not want to do that. Sometimes it's nice to have the site name show up in the title that's shared via social media, to tie in the branding. Your call tho!

1
  • Thanks, yes, I am using a Twig array to define values for specific fields, but entry.title returns the modified title with the siteName appended. I've updated my question with my example code. Commented Jul 17, 2017 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.