Answers.Body: <p>So the default global settings for SEOmatic should definitely be applied to pages that don't have corresponding entries in the CMS. That's what the global defaults do.</p>
  
  <p>By far the easiest way to do what you want is just to create a Single that corresponds to these otherwise non-managed pages, and then you can set up whatever you like in the corresponding Content SEO settings.</p>
  
  <p>If you don't want to do that, you <em>can</em> set everything yourself via the Twig API:</p>
  
  <p><a href="https://nystudio107.com/docs/seomatic/Using.html#seomatic-variables" rel="nofollow noreferrer">https://nystudio107.com/docs/seomatic/Using.html#seomatic-variables</a></p>
  
  <p>You could try doing something like:</p>
  
  <pre><code>{% do seomatic.meta.setAttributes(myCustomSeoMetaField.metaGlobalVars)
  %}
  </code></pre>
  
  <p>As per: <a href="https://nystudio107.com/docs/seomatic/Fields.html#template-access" rel="nofollow noreferrer">https://nystudio107.com/docs/seomatic/Fields.html#template-access</a></p>
  
  <p>But in general, I think this is a rougher work-around than just creating a Single for the previously non-content managed pages.</p>
  
  <p>To be clear:</p>
  
  <blockquote>
    <p>PS the reason I want to do it this way is partly because the Global/default SEOMatic settings didn't seem to be coming through on a non-entry, so I was hoping using some sort of default hook will take care of this also.</p>
  </blockquote>
  
  <p>This should not happen. You absolutely should get the default SEO settings on every page, so if this isn't happening for you, something deeper is wrong.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-18T09:12:00.473Z
Answers.Text: Thanks! You answered my actual question, and also made me dig deeper on the root issue, which was that I've got a multisite setup and hadn't configured SEOMatic for both sites, hence nothing being pulled through.
Answers.UserDisplayName: mijewe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-05T16:45:01.140Z
Answers.LastActivityDate: 2020-06-05T16:45:01.140Z
Answers.UserDisplayName: andrew.welch
Body: <p>I've got a few pages on my site that are not content managed.</p>
  
  <p>I don't want to create entries for these pages, but I <em>do</em> want the SEO for these pages content managed.</p>
  
  <p>My solution here has been to set up a global matrix block, with each block having a <em>handle</em> and <em>seomatic</em> field.</p>
  
  <p>This way the SEO for these non-entries is content managed, but the pages themselves aren't.</p>
  
  <p>Is there a way for me to tell SEOMatic to render a custom SEOMatic field? I tried <code>{% do seomatic.meta.setAttributes(myCustomSeoMetaField) %}</code> but had no luck, and can't see anything in the docs.</p>
  
  <p>PS the reason I want to do it this way is partly because the Global/default SEOMatic settings didn't seem to be coming through on a non-entry, so I was hoping using some sort of default hook will take care of this also.</p>
  
Tags: <craft3><plugin-seomatic>
Title: Have SEOMatic render a custom SEOMatic field
ThreadText: # Have SEOMatic render a custom SEOMatic field
  
  (Asked by: username_0 on 2020-06-05)
  
  I've got a few pages on my site that are not content managed.
  
  I don't want to create entries for these pages, but I *do* want the SEO for these pages content managed.
  
  My solution here has been to set up a global matrix block, with each block having a *handle* and *seomatic* field.
  
  This way the SEO for these non-entries is content managed, but the pages themselves aren't.
  
  Is there a way for me to tell SEOMatic to render a custom SEOMatic field? I tried `{% do seomatic.meta.setAttributes(myCustomSeoMetaField) %}` but had no luck, and can't see anything in the docs.
  
  PS the reason I want to do it this way is partly because the Global/default SEOMatic settings didn't seem to be coming through on a non-entry, so I was hoping using some sort of default hook will take care of this also.
  
  **Tags:** craft3, plugin-seomatic
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-06-05. Score: 2 | Accepted answer
  
  So the default global settings for SEOmatic should definitely be applied to pages that don't have corresponding entries in the CMS. That's what the global defaults do.
  
  By far the easiest way to do what you want is just to create a Single that corresponds to these otherwise non-managed pages, and then you can set up whatever you like in the corresponding Content SEO settings.
  
  If you don't want to do that, you *can* set everything yourself via the Twig API:
  
  <https://nystudio107.com/docs/seomatic/Using.html#seomatic-variables>
  
  You could try doing something like:
  
  ```
  {% do seomatic.meta.setAttributes(myCustomSeoMetaField.metaGlobalVars)
  %}
  
  ```
  
  As per: <https://nystudio107.com/docs/seomatic/Fields.html#template-access>
  
  But in general, I think this is a rougher work-around than just creating a Single for the previously non-content managed pages.
  
  To be clear:
  
  > PS the reason I want to do it this way is partly because the Global/default SEOMatic settings didn't seem to be coming through on a non-entry, so I was hoping using some sort of default hook will take care of this also.
  
  This should not happen. You absolutely should get the default SEO settings on every page, so if this isn't happening for you, something deeper is wrong.
  
  > **Comments:**
  > **username_0**: Thanks! You answered my actual question, and also made me dig deeper on the root issue, which was that I've got a multisite setup and hadn't configured SEOMatic for both sites, hence nothing being pulled through.  
  
  ---
  
  