Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using Feedburner for my feeds and I am also using Sharedaddy from Jetpack to display the sharing icons. I'd like to disable these buttons in the feed, how can I do this? Thanks

share|improve this question
    
What have your tried already? How are the icons added to the feed? –  toscho May 12 '12 at 5:44
    
There is no option to disable or enable display in feeds, so I'm just running on default to display the sharing icons on posts. –  drtanz May 12 '12 at 16:53
    
How are the icons added programmatically? –  toscho May 13 '12 at 12:23
    
I think Feedburner just reproduces the posts, as in feeds.feedburner.com/WordPressBlogsites, how do you take off the sharing icons? –  drtanz May 16 '12 at 15:26
    
I think Feedburner is using the feed output, not the regular blog post. So somewhere Sharedaddy adds these icons on the hooks 'the_content_feed' or 'the_content'. Find that code and add it to your question. –  toscho May 16 '12 at 15:29
show 1 more comment

1 Answer

The icons are added to the feed per filter in modules/sharedaddy/sharing-service.php:

add_filter( 'the_content', 'sharing_display', 19 );

sharing_display() does check for is_feed(), so there shouldn't be a problem … seems to fail for no obvious reason.

You could add another check; something like this:

add_action( 'init', 'disable_sharedaddy_in_feed' );

function disable_sharedaddy_in_feed()
{
    is_feed() and add_filter( 'sharing_show', '__return_false' );
}
share|improve this answer
    
Toscho with his beautiful minimal code. –  Brady May 16 '12 at 15:55
    
thanks im adding it let's see if it does the trick. –  drtanz May 16 '12 at 16:01
    
till now it still displays them, not sure if it takes time for feedburner to show changes. –  drtanz May 16 '12 at 16:03
    
@drtanz Feedburner has a force refresh button somewhere. I don't use it, so you have to find it on your own. :) –  toscho May 16 '12 at 17:22
    
even after resyncing it still works the same, maybe there is something wrong with the theme :S –  drtanz May 18 '12 at 8:46
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.