The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
|
Changing metatags (DOM ready) - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: Changing metatags (DOM ready) (/showthread.php?tid=5551) |
Changing metatags (DOM ready) - Rene - 2014-01-23 Hi, On a dynamical product page I want to change the metatags (SEO) with the actual product information. I've made the following with jQuery but does this change make sense (for SEO) after DOM is ready? The page source is not showing the changed metatags, with Firebug it does. Code: $('meta[name=description]').attr('content', '<?php echo $description; ?>'); Is there a way (function) to change this after function get_header(); is started? Regards, René RE: Changing metatags (DOM ready) - Timbow - 2014-01-23 Hi Rene, I don't really understand why you would need to do this. The keyword tag is obsolete for SEO and the description nearly so. RE: Changing metatags (DOM ready) - Rene - 2014-01-23 (2014-01-23, 21:26:03)Timbow Wrote: Hi Rene, Ok, ok, I know. Let's not get bogged down in a discussion about this. Posts with meta keywords had more relevant ads than posts without it. For that I believe the meta tags are still very important and DOES matter. As far as the ranking there are plenty of pros and cons. It does not hurt adding them. My question is not about why but how! RE: Changing metatags (DOM ready) - Carlos - 2014-01-24 (2014-01-23, 22:42:53)Rene Wrote: My question is not about why but how! You can alter global variable $metak BEFORE calling get_header() RE: Changing metatags (DOM ready) - Rene - 2014-01-24 (2014-01-24, 06:23:31)Carlos Wrote:(2014-01-23, 22:42:53)Rene Wrote: My question is not about why but how! Thx Carlos, have noticed this global. But therefore have to setup the productpage & vars before calling get_header(). But I was just thinking, a search for metatags with %product_meta_% and replace it with the right info (plugin hook/filter content). Back to the drawingboard for me RE: Changing metatags (DOM ready) - Carlos - 2014-01-25 You can use the index-pretemplate hook. RE: Changing metatags (DOM ready) - shawn_a - 2014-01-25 You cant filter meta keywords. You will have to manipulate the global carlos mentioned. RE: Changing metatags (DOM ready) - Rene - 2014-01-28 @Carlos, @shawn_a, Thx, I will try that. I've just noticed the above mentioned jQuery code caused pages to stop (due errors) so I disabled it. Anyway, changing meta server side is much better. |