5

The following works (but is undocumented): {% set seomaticSiteMeta = seomaticSiteMeta | merge({'siteSeoTitlePlacement': 'before'}) %}


5

To update plugins like SeoMatic, just download the latest (either clicking on the direct download link from the /admin/updates/ page in your admin area or from github). Then you just then need to upload the new folder, overwriting the old one, to your server in the /craft/plugins directory (make sure you rename the download to seomatic as before, removing ...


4

Are you using the SEOMatic Meta fieldType? What I do is create a field of this field type and assign it to the entry type you're dealing with. Within this field, there are all sorts of values you can override. For instance, you can point the SEO title field to one of your other fields via a dropdown, or you can manually type in a new SEO title just for ...


4

Have you created a new SEOMatic Meta fieldType? I don't know whether there is another/better way of doing it, but what I do is create a new field of type SEOMatic Meta, then assign this field to the entry types of the pages you want the title to be made available to SEOMatic. There are all sorts of options within this field, but one of them allows you to ...


4

I've used SEOmatic and ImageOptimize together before and never had those issues. SEOmatic should care less about the presence of the ImageOptimize field on the asset and you definitely don't need to specify custom ImageOptimize variants for your SEO/social purposes. SEOmatic grabs the raw image (like you would grab the asset url in the templates) and does ...


3

So it looks like you're using the old syntax for SEOmatic 1.x for Craft 2.x; here's how you do the same thing in SEOmatic for Craft 3: {% do seomatic.meta.seoTitle("Some Title") %} c.f.: https://github.com/nystudio107/craft-seomatic#twig-templating


3

You need to tell Google that you have a new site or the best SEO in the world won't matter a jot; Google has no idea your site exists until you tell it. There are 4 essential steps to getting your site indexed: Add your URL – Submit your website for inclusion in Google's index. App crawling – Get your app indexed by Google. Search Console – Submit a ...


3

Currently, no, SEOmatic cannot pull from a category field. You have two options: Use the Preparse Field, and have that set to be whatever you want it to be (pull output from a Category, whatever): https://github.com/aelvan/Preparse-Field-Craft Do it manually via Twig in your templates: https://github.com/nystudio107/seomatic/wiki/10.-Dynamic-Twig-SEO-Meta


2

Absolutely. Just create those fields then assign them to your categories under field layout just like you would do for your sections.


2

Craft is going to have a better update system in a version 3. With Seomatic you can also be able to update via composer. As far as I know.


2

Make sure you're not doing this inside of a {% block %} or you will run into Twig Processing Order / Scoping issues. There are some good examples of doing that here: Dynamic Twig SEO Meta


2

Robin's answer above is valid, but I have managed to create an override in my main _layout template like this: {% if entry.canonicalUrl|length > 0 %} {% set seomaticMeta = seomaticMeta | merge({'canonicalUrl': entry.canonicalUrl}) %} {% endif %} {% hook 'seomaticRender' %}


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!


2

This has to do with Google Structured Data and how your site appears in search results. If you use these fields, your site will show a custom search box in Google Search results, like this: Basically, the Search Target is a URL where you'd want any search queries to get directed to. So in the example above for Pinterest and a custom search for "Pizza", the ...


2

I'm not entirely sure why you need to resave all the entries but I do know how you can do it quickly and easily. I'd recommend using the Walk plugin by Michael Rog to do this. The plugin is pretty well-documented in the repository README, but I'll outline the steps here for you as well: Download the plugin folder, drop it in /craft/plugins, and install the ...


2

So you can do this via Twig as discussed here: https://github.com/nystudio107/craft-seomatic#twig-templating ...but you can also just make an Single for your Index page (this is what I usually do) and all of this will "just work" including the SEO sidebar previews in the CP.


2

Based on the SEOmatic docs, something like this should do the trick nicely: {% do seomatic.meta.seoTitle("my title") %}


2

These errors will only appear with devMode on, and they are intended to help you diagnose potential problems with the meta tags and other information that you are rendering. These are all soft errors, though. You can safely ignore them if they are a result of you not filling in things that you don't intend to fill in. You can read more about it here: ...


2

This has been added in SEOmatic 3.1.36 as per this release announcement tweet You can do it via the GUI in SEOmatic -> Site Settings -> Sitemap: https://github.com/nystudio107/craft-seomatic#additional-sitemaps ...or you can do it via plugin: use nystudio107\seomatic\events\RegisterSitemapsEvent; use nystudio107\seomatic\models\SitemapIndexTemplate; use ...


2

This is actually pretty simple... If you navigate to SEOmatic → Site Settings → Miscellaneous, you'll see a table at the bottom of the page where you can input custom sitemap urls. Once you add a url in here and save it, it will get added to a custom index sitemap that is included at the bottom of your main index sitemap: /sitemaps/1/sitemap.xml <...


2

Both SEOmatic for Craft 2 and SEOmatic for Craft 3 have built-in functions to give you these URLs. I'm not sure which you are using so... For Craft 2: https://github.com/nystudio107/seomatic/wiki/15.-Utility-Filters-&-Functions#getlocalizedurls For Craft 3: https://github.com/nystudio107/craft-seomatic#helper-functions-seomatichelper


2

Have you checked out some of the examples here? Annotated JSON-LD Structured Data Examples -- specifically the devMode.fm Episode Page example shows adding an array of "actors" and "mentions" to the RadioEpisode type. The key concept is that anything that can be a schema.org type can also be an array of that type as well.


2

I hadn't seen those examples but it is bookmarked now. I've adapted your example as below and it's all working. Thanks @andrew.welch {% set performersArray = [] %} {% for block in entry.performers .all() %} {% set performersArray = performersArray | merge([seomatic.jsonLd.create({ 'type': block.performerType, 'name': block.performerName, }, ...


2

SEOmatic has some functions that it uses for its controller endpoints for returning metadata for SPAs and the like: SEOmatic headless SPA APIs We can leverage these for our own purposes in an Element API endpoint, if for some reason you can't ping the SEOmatic controller via AJAX or use GraphQL to access the data. use nystudio107\seomatic\helpers\...


2

Variables like entry are only auto-injected for routes that match the Section's Site Settings routes: If you're using custom routes, they won't match, and you'll need to set entry (or whatever) yourself manually. SEOmatic uses the same Craft mechanism for recognizing injected entrys (or whatever), so the same applies there. Vide: Rendering Metadata From ...


2

By setting the regenerateSitemapsAutomatically to false, SEOMatic won't regenerate a sitemap for every entry saved. At the end of the job, I set it back to true and save the first element inside of the same section. Changes to the original code: Seomatic::$settings->regenerateSitemapsAutomatically=false; // Disable it while (($csv = fgetcsv($handle)) !...


2

Solved There is an environment override in SEOmatic's settings. This was set to local instead of live.


2

I this for the Craft 2 version of SEOmatic, or the Craft 3 version of SEOmatic? The Craft 3 version does not have a {% hook 'seomaticRender' %} tag at all. Instead, the metadata is automatically added where it should go to various parts of the document. I wouldn't recommend changing where this is output without a good reason, but if you really want to: ...


2

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 ...


2

Yep, you should definitely be able to do what you want. What I do is I test the code in the actual Twig template used to display the page, and then once I have it working, I paste it into the SEOmatic field, and add object. in front of the entry. e.g.: If this gives you the results you want in the template: {{ entry.title }} | {{ entry.parent.title }} | ...


Only top voted, non community-wiki answers of a minimum length are eligible