• Resolved thebobby

    (@thebobby)


    Hi guys,

    Sorry if this issue has already been covered.

    I’m actually developing my own theme for a blog (proudly powered by WP 2.7). My problem is that I use some plugins that automatically add meta datas in my header.php (link to JS files, some CSS code,…) which is not good for SEO.

    I’d like to know if there’s a plugin or a hack to clean all those (sometimes unnecessary) datas.

    ps : sorry if there’re some grammatical mistakes, English is not my mother tongue ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Links to javascript and css files should have no bearing on SEO. Plugins need to add this code to the head section of the document to function properly. Taking it away would render some plugins useless. SEO has more to do with good content + backlinks rather than styling and client-side scripting links.

    Thread Starter thebobby

    (@thebobby)

    I know that SEO has more to do with good content. The code generated is not always required by the plugin and sometimes it creates W3C error.

    I know what I’m dealing with, I just don’t know how to achieve what I want to do.

    If you are using a plugin that is creating a w3c error, than it is best to fix the error in the plugin that is causing the error. most of the time it is an easy fix. Then you could alert the plugin author that there is an error in their code and ask them to fix it in a upcoming release. If the plugin is licensed under GPL you can also re-release including your valid html/css fix. This was actually done with the realse of WordPress 2.5 where the gallery shortcode was causing invalid code to print. Someone created a plugin that fixed the errors + added a bit of cool functionality.

    If you really don’t want any plugin to touch the head of your document, you could just not add the wp_head() action from your header.php file, but, this will cause more trouble for you down the road when newly installed plugins fail to function properly. If you are releasing your theme for others to download and use, I would strongly suggest including the wp_head() action in your header.php file.

    Thread Starter thebobby

    (@thebobby)

    OK, I’ll tell the plugin author about the W3C error.
    Apparently there’s no durable solution to my problem. Thanks anyway for your answer.

    There actually is a solution:
    Find wp_head in your plugin file.
    Then do something like this in your functions.php:
    remove_action(‘wp_head’, ‘wpm_css’, 10, 2); // menubar empty css

    Done?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to clean meta datas generated by plugins?’ is closed to new replies.