How to hide SyntaxHighlighter Evolved plugin meta tag

Syntaxhighlighter plugin is very useful if you are writing posts which contain pieces of code.Many a times people give code examples in the post to make things simple for the visitors.I sincerely believe this is good thing to do.A few lines of code is more helpful then a big paragraph.Syntaxhighlighter makes the presentation much user friendly.

It highlights the code according to the programming language of the code.This enhances readability.Syntaxhighlighter evolved plugin also gives toolbars for copy and print of the code snippet.This toolbar controls prove very handy for visitors.Every major language is supported by this plugin so you can use it on your blog without a thought.

But it also adds a meta tag within <head> section of your source code.This is totally useless and removing this line does not impact plugin functionality.The meta tag fails in w3 markup validator.It Reveals information about your website (the plugin and version you are using).It also increases size of your head section.

To remove this meta tag follow below steps

  • Open the file syntaxhighlighter.php.This file is located within wp-content/plugins/syntaxhighlighter folder.
  • You can also open this file from WordPress dashboard by choosing option Plugins –> Editor and on Editor screen selecting SyntaxHighlighter plugin.
  • In the file locate below code snippet
function output_header_placeholder() {
echo '' . "n";
  • Comment the echo line in code above.So your modified code should look as shown below.
function output_header_placeholder() {
// echo '' . "n";
  • Save the file and empty the cache (if you are using caching plugins).
  • See the source code of your website to verify the meta tag deletion.
READ  Tracking Social Media Usage Statistics Key to Social Success

Feel free to share your suggestions and queries.

Leave a Reply

Your email address will not be published. Required fields are marked *