Disable Disqus on WordPress Pages
Every bit we talked earlier about on disabling Disqus comments on WordPress pages is makes sense.There are many reasons to use Disqus commenting system. Mainly Disqus has an own spam filtering system which is very Easy for users And more over Comments loads asynchronously, which means your site loads fast.Remove Disqus footer to sped up your website even more.
How to Disable Disqus on Certain Pages in WordPress
While integrating Disqus ,you should have been installed Disqus comment system plugin.It's automatically shows comments on pages and posts.Some may not desire to disable Disqus comments on all WordPress pages.Make sure you have back up copy of your files before editing plugins and themes.Learn how to disable Disqus on certain pages wordpress.
1.Log on to your WordPress admin panel
2.Go to Appearence > Editor and select functions.php
3. The below code should be added to your WordPress theme's functions.php file.
function hide_disqus() {
if (is_page('Contact Us')) { ?>
<script>
$(document).ready(function() {
$("#disqus_thread").remove()
});
< ?php } }
add_action('wp_footer', 'hide_disqus');
[/php]
In the above code we entered Contact Us,means that on this page disqus comment system removed.You can change certain WordPress page title.That's it.It's easy to disable disqus on specific pages.
Disable Disqus on certain pages :
If you want to disable disqus on multiple pages,then use the following code at the place of
if (is_page('Contact Us')) { ?>
[php]
if (is_page('contact us')||is_page('about')||is_page('services')) { ?>