Forum
Blog post with editable seo tags
Hi how can I edit the meta tags when using the blog posting template?
I'm trying to implement the changes so that they can be applied individually to a new blog post rather then the same details going across every blog post.
Can anyone help?
Add the fields to your
post.html
template withsuppress="true"
set so they're not output.Copy them into a template to output into the
<head>
of your page without thesuppress
attributes.Use
perch_blog_custom()
to output the post in the head of the page using the head template.Ok thanks although i seem to be a bit lost on that answer. I will try it now.
So this is what I put into the post.html template
<perch:if exists="title"> <title> <perch:content id="title" type="text" label="title" suppress="true" /></title> </perch:if>
<perch:if exists="description"> <meta name="description" content="<perch:content id="description" type="textarea" suppress="true" label="Page Description" help="This will show in search engine results and should be up to 160 characters max" />"/> </perch:if>
<perch:if exists="keywords"> <meta name="keywords" content="<perch:content id="keywords" type="textarea" suppress="true"label="Keywords" help="Words and phrases separated with comma" />"/> </perch:if>
<perch:if exists="author"> <meta name="author" content="<perch:content id="author" type="text" suppress="true" label="Author" />"/> </perch:if>
<perch:if exists="no-robots"> <perch:content id="no-robots" type="checkbox" label="Robots : Don't include Robot Meta" help="Check this box if you do not wish to include robot meta, otherwise select from the list below" suppress="true"/>
<perch:else /> <meta name="robots" content="<perch:content id="robots1" type="checkbox" label="All" value="all," /><perch:content id="robots2" type="checkbox" label="None" value="none," /><perch:content id="robots3" type="checkbox" label="Index" value="index," /><perch:content id="robots4" type="checkbox" label="No index" value="noindex," /><perch:content id="robots5" type="checkbox" label="Follow" value="follow," /><perch:content id="robots6" type="checkbox" label="No follow" value="nofollow," /><perch:content id="robots7" type="checkbox" label="No image index" value="noimageindex," /><perch:content id="robots8" type="checkbox" label="No image click" value="noimageclick," />" /> </perch:if>
Then from here I copy them into another template?