jaredatch/EA-Share-Count

Displaying after content issue

Closed this issue · 3 comments

First, thank you for great plugin!

I have noticed one issue in several sites where I use the plugin. When I set Theme Location to After content or Before and After Content, social sharing buttons always remain before the content.

If I set Before and After Content, I get sharing button twice before the content.

screenshot 2016-05-19 13 55 14

I tried to check the code but didn't notice any problems and run out of time.

I'm using regular _s based theme, not Genesis or Theme Hook Alliance.

Also got the same issue using Twenty 16.

In the display functions we have can either echo the share buttons (if using a hook) or return the share buttons (if using a filter). The logic was messed up so it always echoed. This resulted in the share buttons appearing before the post content regardless of selected theme location if you were using the filter.

Thanks!