How To Remove Digg Digg Floating Share Bar From WooCommerce Products

How To Remove Digg Digg From WooCommerce ProductsI love the Digg Digg social sharing plugin for WordPress and put it on just about every site that I build (including this one).

It floats nicely down the page and is such a slick looking way to get people to interact with your blog posts on social media.

But there’s a couple of shortcomings with the plugin and the guys from Buffer (who now own the plugin) obviously don’t have a boat load of extra time dedicated to fixing them.

One such shortcoming is that it doesn’t handle custom post types very well, in particular for me the main annoyance was having Digg Digg’s floating share bar show on all WooCommerce product pages.

I came up with this short code snippet to get it to stop showing on any WooCommerce related page, feel free to use it in your functions.php:

function dd_exclude_from_woocommerce() {
	if(is_woocommerce()) {
		remove_filter('the_excerpt', 'dd_hook_wp_content');
		remove_filter('the_content', 'dd_hook_wp_content');
add_action('template_redirect', 'dd_exclude_from_woocommerce');

Looking for a coding job? See our job listings page. Click here to view →

About Josh Kohlbach

Josh is a programmer, entrepreneur and the founder of Code My Own Road. He started this website to help programmers with business stuff and also to get things straight in his head. You can read more about Code My Own Road and Josh on the About page

7 Responses to How To Remove Digg Digg Floating Share Bar From WooCommerce Products

  1. steve garth September 12, 2013 at 10:56 am #

    Hi Josh,

    You saved my life! I’m with you – I love Digg Digg but it doesn’t play well with Woocommerce.

    Thanks for sharing!

    All the best


    • Josh Kohlbach September 12, 2013 at 11:00 am #

      Not a problem Steve 🙂 Glad it helped!

  2. Arman February 6, 2014 at 4:06 am #

    where the functions.php file for editing?

    • Josh Kohlbach February 12, 2014 at 2:18 pm #

      You’ll find it in your theme’s root directory wp-content/themes/your-theme/functions.php

  3. Ivan August 21, 2014 at 7:53 pm #

    I was searching a way for stop showing diggdigg on my mobile pages and finally I found solution.

    Only one line of code inside css make my day better 🙂

  4. Mike Xavier May 11, 2015 at 8:51 am #

    Cheers Josh, works a treat!

  5. David Findlay October 4, 2015 at 9:37 pm #

    Thanks for that solution – it definitely helped me on my store.

Leave a Reply

Read more:
7 Incredibly Essential Plugins For WordPress Blogs & Websites

After you install Wordpress for the first time, get your template nicely in place, you might begin to wonder where...