4images Issues / Ausgaben > Discussion & Troubleshooting

Google Canonical

<< < (4/4)

khansahib:
ah sorry i didn't mentioned that its in index.php

bergblume:

--- Quote from: khansahib on July 16, 2011, 08:01:48 PM ---ah sorry i didn't mentioned that its in index.php

--- End quote ---

ahhh ok, thanks!!

wflorian:
does not work with 4image install...

did anybody get this mod to work?

sathishIPL:
Hi ,

Check out this , it is working Mod

http://www.4homepages.de/forum/index.php?topic=17598.420

Best Regards,
Satz

Geezer:
it doesn't really work! Why? Is the code too old?


--- Quote from: khansahib on July 16, 2011, 07:35:31 PM ---Here is how its done :).

open index.php file and find


--- Code: ---include(ROOT_PATH.'includes/page_header.php');
--- End code ---

Paste the following just before the above line.


--- Code: ---if(isset($_GET['page'])) {
        $site_template->register_vars("google_con_url", '<link rel="canonical" href="' . ROOT_PATH . '/' . $_SERVER['REQUEST_URI'] . '" />');
}
else {
        $site_template->register_vars("google_con_url", '');
}
--- End code ---


and insert


--- Code: ---{google_con_url}
--- End code ---
in header of your template. Make sure its between <head> tags.

--- End quote ---

Navigation

[0] Message Index

[*] Previous page

Go to full version