I'm currently using the HTML nugget plugin to insert into the head for site-wide information.
Needing to insert robot meta tags and rel canonical tags to the head of individual static pages.
Is there a way to do this, maybe another plugin I'm overlooking?
Meta and Rel tags for individual pages
-
- Regular
- Posts: 16
- Joined: Fri Dec 14, 2018 6:27 am
Re: Meta and Rel tags for individual pages
Not specifically for robots and canonical, I think.
A lot the more modern themes included in the s9y core add these in their index.tpl, for example 2k11. If you're using an older theme and don't want to switch, you could just add the respective lines to your index.tpl (in the <head> area, of course).
YL
A lot the more modern themes included in the s9y core add these in their index.tpl, for example 2k11. If you're using an older theme and don't want to switch, you could just add the respective lines to your index.tpl (in the <head> area, of course).
Code: Select all
{if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || $staticpage_pagetitle != "" || $robots_index == 'index')}
<meta name="robots" content="index,follow">
{else}
<meta name="robots" content="noindex,follow">
{/if}
{if ($view == "entry")}
<link rel="canonical" href="{$entry.rdf_ident}">
{/if}
{if ($view == "start")}
<link rel="canonical" href="{$serendipityBaseURL}">
{/if}