Community Forums › Forums › Archived Forums › General Discussion › Meta Generator in Genesis Header, SEO plugins
- This topic has 2 replies, 2 voices, and was last updated 10 years, 7 months ago by David Chu.
-
AuthorPosts
-
August 28, 2013 at 3:11 pm #59326David ChuParticipant
Hi,
As per Gary, I'm just posting an FYI about a little anomaly - I wouldn't even call it a bug per se.If you're like me, you like to remove the meta generator code in the header that tells that you're running WordPress and what version it is. It is true that anyone with a little savvy can ascertain that you're running WordPress anyway. But no sense in making WordPress an even bigger hacking target than it already is. And besides, having that in there is just so, well, Joomla-like, and coming from me, that's dirty language. ๐
Genesis removes the generator line by default. So I was surprised to see it in my shiny new Genesis 2 site. If that doesn't matter to you, definitely tune this out! ๐ In any case, I figured out why, and here's the sequence.
seo.php is run, doing some SEO stuff (hard to believe, I know). One of its tasks is to disable Genesis SEO if you have another plugin for it.
seo.php runs genesis_seo_compatibility_check(),
which in turn runs genesis_detect_seo_plugins()If seo plugin is detected, run genesis_disable_seo()
genesis_disable_seo() runs
remove_action( 'get_header', 'genesis_doc_head_control' );.... and the only problem with that is that prevents that nice function (with its most excellent name) from doing one of its tasks: getting rid of the "generator".
Why was my Genesis 2 affected? Because SEO Ultimate, the plugin I use, was just added to the SEO list! Mystery solved. I did another test, and found that the same generator deal occurs in Genesis 1 for these SEO plugins that were already in there: All-In-One, Yoast, Platinum SEO, and Headspace.
The workaround is easy. Just pop this in your functions.php:
remove_action( 'wp_head', 'wp_generator' );
Other ideas would be to move that generator removing function elsewhere, but I don't have an obvious suggestion, especially in core code.
Cheers, Dave
Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers
September 1, 2013 at 3:08 pm #60100Gary JonesMemberThanks for sharing David,
It's not really a bug, but I think genesis_doc_head_control() could be split up, or the Document Head Control should be split up so that the bits that are definitely not SEO-related are moved into Theme Settings (and not unhooked if an SEO plugin is present). I'll raise a ticket for it to be considered.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
September 2, 2013 at 7:28 am #60241David ChuParticipantGary,
That sounds great, thanks. I will keep an eye out for any more significant concerns, although, thanks to your participation, any problems have been reduced to near zero!I'm already reading and enjoying your Genesis 2 Guide.
Dave
Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.