Categories: Open Source

Remove Extra Spans From Syntaxhighlighter

Recently I was writing a blog post and added some code with the help of Syntaxhighlighter plugin. With this Syntaxhighlighter plugin we can embed code in WordPress and highlight source code. When I was seeing the code, it was showing some extra spans with class “IL_AD“.

Remove Extra Spans From Syntax Highlighter Plugin

SyntaxHighlighter is a tool written in javascript to highlight the code.  The best thing about SyntaxHighlighter is that it can be used on any site and even it can be integrated into many popular blog platforms like blogger, wordpress and cms like drupal, joomla easily.

When I checked the code in the admin panel, it was not showing any extra span but when it gets rendered it was showing a span with class “IL_AD” and id “IL_AD3”.

I was using Google chrome, so I just did “Inspect element” which I generally use for debugging javascript and html in browser.

After inspecting I found same classname “IL_AD” multiple times. When I checked that it was for the elements where “Infolinks Ads” were present.

So this issue comes when you are using Infolinks ads on your blog or website. So to get rid of this the simple solution is to disable infolinks for this piece and again enable it after this piece of code.

I found in the official documentation of the infolinks that, it is possible to disable infolinks in certain part of the code. Read more at infolinks “Disable infolinks ads in certain areas“.

So I used off tag of the infolinks to disable infolinks ads in that section and again used on tag to enable ads again.

To disable infolinks ads in syntaxhighlighter, just put following code before the start tag of the code

<!--INFOLINKS_OFF-->

To enable infolinks ads after syntaxhighlighter, just put following code after the end tag of the code

<!--INFOLINKS_ON-->

Have you ever faced this issue or something similar to this ?

ProWebGuru

Mostly I write about technology related stuff on https://www.prowebguru.com Recently I have started making videos also. Mostly blog posts & videos are related to technology, programming and learning some new tips and tricks related to windows, wordpress, google app script, technical, programming, javascript, jquery and other coding related stuff. Youtube channel - https://www.youtube.com/user/prowebguru

View Comments

Recent Posts

GPT 5.4: Powerful AI Breakthrough – 7 Game-Changing Features, Launch Date & Full Guide

GPT 5.4: The Next-Generation AI Model Transforming Reasoning, Coding, and Productivity Artificial Intelligence is evolving…

1 day ago

GPT‑5.3 Instant Explained: Faster, Smarter & Fewer Refusals

GPT-5.3 Instant is OpenAI's latest ChatGPT model update, prioritizing smoother conversations, fewer refusals, and higher…

2 days ago

Free Perplexity Pro for Airtel Customers: Unlock Advanced AI Assistance at No Cost!

Are you tired of scrolling endlessly through Google results trying to find clear, trustworthy answers?…

4 months ago

Unlocking Collaborative Coding with GitHub Copilot Spaces

In recent years, the process of software development has rapidly evolved—developers demand smarter tools and…

4 months ago

ChatGPT Go Now Free in India: Opening Doors to Advanced AI Capabilities

India has emerged as one of the fastest-growing and most significant markets in the global…

4 months ago

AgentKit by OpenAI: Redefining the Future of AI Agent Development

On October 6, 2025, OpenAI unveiled AgentKit, a unified suite of tools designed to help developers and…

5 months ago

This website uses cookies.