Skip Navigation

[Resolved] Using a content template causes social sharing plugin to display twice

This thread is resolved. Here is a description of the problem and solution.

Problem:
Post is rendered using a Views Content Template, but the social sharing plugin is triggered twice.

Solution:
Please try this:
modify the content template shortcode [wpv-post-body view_template="None"] to:
[wpv-post-body view_template="None" suppress_filters="true"]
and test again.
Relevant Documentation:
https://toolset.com/documentation/views-shortcodes/#wpv-post-body

This support ticket is created 8 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by cantonB 8 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#371558
doubled-up-social-sharing.png

I've been trying to decide which social sharing plugin to use on my site, but they all exhibit the same problem:

If my post is rendered using a Views Content Template, then the social sharing plugin is triggered twice. This is even the case if the View is as basic as just echoing out the body like so:

[wpv-post-body view_template="None"]

(See attached screenshot.)

I suspect all of the social sharing plugins rely on the same trigger to display their buttons. Is there anything I can do to prevent Views Content Templates from invoking this trigger a second time?

NB: I am using the Divi theme in case that is a part of the problem.

#371671

Dear canton,

Please try this:
modify the content template shortcode [wpv-post-body view_template="None"] to:
[wpv-post-body view_template="None" suppress_filters="true"]
and test again.

More help:
https://toolset.com/documentation/views-shortcodes/#wpv-post-body
suppress_filters (opt):
'true' | 'false' (default)
If suppress_filters=’true’, all third party (non WordPress) filters hooked into the_content filter will be removed, when retrieving the post body. In certain circumstances, plugins using this filter can add duplicated content to the post body – removing the filters can resolve this problem.

#371843

Thank you very very much!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.