Setting a Plugin Object I'm currently using SEO by EtherCreative on Craft 2, one of my pages needs a custom title and description injected into it like this on the docs:


  In some cases, you will not have access to an SEO field, but will want
  to set the page title &amp; description. You can do this by creating a
  custom SEO object using the function below:


craft.seo.custom('The Page Title', 'The page description', $includeDefaultTitleSuffix)


Mine seems to be throwing errors or not doing anything like so:

  {% set seo = craft.seo.custom('Discount codes and vouchers for {{ query }}', 'You searched for {{ query }}. Check out the latest live {{ query }} discount codes &amp; voucher codes for {{ "now"|date("m") }} {{ "now"|date("Y") }} only at Vouchertoday.uk') %}
You can't automatically expand variables inside strings in Twig as you would normally do in PHP.

Instead, you have to concatenate your strings.

{% set seo = craft.seo.custom('Discount codes and vouchers for ' ~ query, 'You searched for ' ~ query ~ '. Check out the latest live ' ~ query ~ ' discount codes &amp; voucher codes for ' ~ now|date('m') ~ ' ' ~ now|date('Y') ~ ' only at Vouchertoday.uk') %}