Adding fragments to header section for Ecwid
Permalink
In order for Google to index my Ecwid store page (AJAX), I need to get a PHP script into the header section. The recommended code is some PHP code found here:
http://kb.ecwid.com/w/page/62638683/Google%20AJAX%20indexing%20for%...
I saw that I can't put straight PHP into the extra header content section.
What is the best way for me to get this PHP code into <head>? Unfortunately, I don't know how to code PHP myself or enough about concrete5 to write a block to do it.
I looked at the Ecwid store block in the marketplace, but saw that when I look at the sample page source, that module also doesn't yield a
<meta name="fragment" content="!" />
inside of head.
Thanks for the help.
http://kb.ecwid.com/w/page/62638683/Google%20AJAX%20indexing%20for%...
I saw that I can't put straight PHP into the extra header content section.
What is the best way for me to get this PHP code into <head>? Unfortunately, I don't know how to code PHP myself or enough about concrete5 to write a block to do it.
I looked at the Ecwid store block in the marketplace, but saw that when I look at the sample page source, that module also doesn't yield a
<meta name="fragment" content="!" />
inside of head.
Thanks for the help.
No, Header Extra Content doesn't accept PHP code.
Try just copying and pasting the 'Ecwid' code into your theme 'header.php' file?
Will having the meta fragments on every page hurt SEO (where it's not needed)? Or, how can I get it just on the page where I want it? Thanks.
Here's one hack that I thought of. Make a copy of the theme, rename it, add the php code to header.php, then assign that hacked theme just to the page of the ecwid store. Seems ugly, but will it work?
This is a good idea. Another option ive taken in similar situations was to create a new page type and call header2.php which would be a copy of header.php that you create with the extra code added ;)
Navigate to: Properties -> Custom Attributes -> Page Header->Header Extra Content
and then add your script code to that box...