Support » Plugin: Digg Digg » [Plugin: Digg Digg] Custom post types and exclusion

  • WordPress can use a great many combinations of different content to acheive a site owners desired look and feel.

    Custom Post Types is one and one that’s been in core for some time now.

    When trying out the Digg Digg plugin, I noticed that the floating tool bar appeared 3 times on a page!

    On closer inspection, they are there as the theme and page uses custom post types (blocks) for the layout.

    The real issue here is I’m unable to untick anything to disable the toolbar from these as the plugin is ignorant of custom post types nor am I able to remove it from specific pieces of content.

    – Can you please scan for custom post types and allow these to be allowed or disallowed for display?
    – Would be great to also be able to do the same for a piece of content in the content edit screen.
    – And fixing Pinterest so a user is presented with a list of page media would be fantastic. Not much point for Pinterest to be displayed otherwise, is there?

    Thanks for the work on the plugin. I’m interested to see how much Buffer has on content distribution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Just add this to your functions.php file:

    if ( get_post_type() != 'post' ) {
        remove_filter('the_excerpt', 'dd_hook_wp_content');
        remove_filter('the_content', 'dd_hook_wp_content');

    That keeps it from loading on any post type except, explicitly, posts. You can edit this to suit your needs.

    Scratch that—it removes it from actual posts, too.

    Instead, I had to put the following in the post type template, just after get_header();:

    remove_filter('the_excerpt', 'dd_hook_wp_content');
    remove_filter('the_content', 'dd_hook_wp_content');
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Digg Digg] Custom post types and exclusion’ is closed to new replies.