Jump to content

How To Add Rich Snippets to Specific CMS Pages?


Recommended Posts

Hello.

 

I write articles under CMS and would like to include some code so that Google and Bing can add associated links, recognize authorship (Google +), image, category, and published date when people search the article.

The thing is that I just want specific pages to show up that way.

 

Does Anybody know what code and how to implement it into specific cms pages?

 

Thank you in advance  :)

Link to comment
Share on other sites

hello

you can edit cms.tpl file located in your theme directory

add there code like

{if $smarty.get.id_cms==3}
GOOGLE SNIPPETS HERE
{/if}

code above will show GOOGLE SNIPPETS HERE only for cms page with id: 3

 

you can add as many if conditions as you want :-)

  • Like 1
Link to comment
Share on other sites

hello

you can edit cms.tpl file located in your theme directory

add there code like

{if $smarty.get.id_cms==3}
GOOGLE SNIPPETS HERE
{/if}

code above will show GOOGLE SNIPPETS HERE only for cms page with id: 3

 

you can add as many if conditions as you want :-)

 

Thank you, Vekia! I'm starting to understand, but not quite sure though. For example, what would be the code for an associated link regarding a specific CMS page? 

Link to comment
Share on other sites

Could I use the following code?

<span itemprop="datePublished" content="2014-03-20"></span>

But, the problem is that I don't know to what cms page to add this code too. Should I add this code to each cms page?

Link to comment
Share on other sites

hello

i pasted example of code that allows to display contents only on defined cms page.

 

i have no idea what kind of contents you want to display there

so instead o "GOOGLE SNIPPETS HERE" add own content (snippet code)

 

then this snippet will appear only on {if $smarty.get.id_cms==3} page

Link to comment
Share on other sites

The context is text like an article.

 

I got the defined code you just kindly gave. However, I can't find the right snippet code used to display the date published nor the link associated.

Do you know what the code is for DatePublished and/or "mini search link"?

 

Thank you

Link to comment
Share on other sites

×
×
  • Create New...