Disable Infolinks Ads In Post, Sidebar, Footer In WordPress

You can disable or remove Infolinks ads from a particular section, sidebar, footer, header, region, archives, search results, search forms, homepage, comments, every page, every post, post or page of your WordPress blog. Below given is the process to disable it from different sections:

1) Sidebars: Infolinks ads doesn’t look good in the widgets and sidebars. To remove Infolinks ads from widgets, sidebars add the below given code as the first line in the sidebar.php file of your theme. You can edit this file from your WordPress admin panel by visiting Appearance –> Editor:

and, add the below given code as the last line in the same sidebar.php file:

That’s it, now, Infolinks ads will not be shown in the widgets and sidebars of your blog.

2) Post, Page section: In a post or page if you adding block-quotes, some important content which should be free from ads or any affiliate marketing links and you don’t wish that Infolinks ads should be displayed in this particular post or page section then, simply add the below given code in the “Text” section of Post or Page editor:

and, add the below given code at the end of the post or page section:

3) For an entire post or page: For some posts or pages you may want that the Infolinks ads should not be displayed entirely for the particular post. For Example, contact page, FAQ page, About page, Services page, Testimonials page, etc. For that, go to “Text” section of Post or Page editor and add the first line as the below given code:

and, add the below given code as the last line:

4) Footer, Header and any other sections: You can remove the Infolinks ads altogether from the footer, header or any other sections of your blog as per your requirements. First, you need to find the specific files which you need to edit for specific sections:

For disabling Infolinks in footer: Edit footer.php

For disabling Infolinks in header: Edit header.php

For disabling Infolinks in archive page: Edit archive.php

For disabling Infolinks in comments section: Edit comments.php

For disabling Infolinks in search results page: Edit search.php

For disabling Infolinks in search forms page: Edit searchform.php

For disabling Infolinks in homepage of your blog: Edit index.php

For disabling Infolinks in every page of your blog: Edit page.php

For disabling Infolinks in every post of your blog: Edit single.php

Now, add the below given code as the first line in any of the above given files as per your needs:

and, add the below given code as the last line in the same file:

Download thousands of Themes, Plugins & Graphics to create your Website. Use promo code ThatsJournal and get an additional 10% off for All MonsterONE Plans.
Disclosure: Thats Journal is supported by our readers. This page may contain affiliate links. That means, if you click on these links to make a purchase, we may earn a small commission (at no extra cost to you). These funds help us to keep this blog up and running.

8 thoughts on “Disable Infolinks Ads In Post, Sidebar, Footer In WordPress”

  1. For Blogger, try this: Click on “Customize” on the top right. Then, click on “Template” on the left menu. Under “Edit Template HTML”, find:

    remove infolinks from sidebar in blogger

    Just below that, place the Infolinks OFF code as given in Step-1 of this article. When you are done, click on “Save template”.

  2. Recent days, we are facing that kind of trouble. Infolinks ads links showing up in sidebars, post titles, and further non targeting places. This post definitely help me a lot, thank you so much for this informative sharing.

    1. For the homepage, you need to edit the index.php file in your blog and add the OFF code as given in the first line and ON code in the last line in that file. (Point Number 4)

Comments are closed.