Skip Navigation

[Resolved] Hide social sharing buttons from views

This support ticket is created 4 years, 2 months 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 4 replies, has 3 voices.

Last updated by hugoC-3 4 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1517999

I added social sharing buttons to my posts using the SocialSnap plugin. These buttons also appear in views I use to include a recent posts block in pages, which I don't want; the buttons should only appear on single posts. The problem occurs with other social sharing plugins as well.

See e.g. hidden link

How can I hide these buttons in views and have them only appear on single posts?

#1518015

I suggest to refer to the 3rd party plugin about where the social share buttons are hooked to.
Most likely they have added the the_content filter which we use to:
- display post bod as a shortcode
- also when having a Content Template in a View loop, this filter is added

You can try to (if the plugin really hooks into the_content()) to unhook it by passing suppress_filters="true" to the Content template in the Views loop.
But this will only work if the plugin uses the WordPress native the_content filter.

#1518067

Ok, I'll try that.
Please explain how to add suppress_filters="true" to the Content template?

#1518483

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

The output section of your View presumably uses a linked content template to output the desired fields using the wpv-post-body shortcode.

So, locate that in the Loop Editor, inside the wpv-loop tags, and add the suppress_filter attribute, like this:|

[wpv-post-body view_template="loop-item-in-my-view" suppress_filters="true"]
#1518553

My issue is resolved now. Thank you!

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