Notifications
Clear all

Style [Solved] How to hide a specific shortcode

7 Posts
2 Users
2 Likes
168 Views
Posts: 46
Topic starter
(@amitkool21)
Trusted Member
Joined: 3 years ago

Hello,

Please take a look at the Forum url page, There you can see just before the 1. The State Hermitage Museum there is a shortcode [toc], Its a shortcode for a plugin to view Table of Contents in the article, Check the same posts contents on this page ::: https://yatrahelpline.com/top5-spb/

So how to hide this automatically in forums. (without removing it manually from every post.)

Thank You.

wpForo Version
2.1.1
WordPress Version
6.1
Topic Tags
6 Replies
Chris
Posts: 2779
Admin
(@chris)
Support Team
Joined: 2 years ago

Hi @amitkool21,

Try this CSS:

#wpforo #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content p[style*="text-align: right"]{
    display:none !important;
}
2 Replies
(@amitkool21)
Joined: 3 years ago

Trusted Member
Posts: 46

@chris 

 

I guess with this CSS code if I'll align anything right in forum, then I'll get hidden automatically...... Please correct if I'm wrong. 

Chris
Admin
(@chris)
Joined: 2 years ago

Support Team
Posts: 2779

@amitkool21,

I guess with this CSS code if I'll align anything right in forum, then I'll get hidden automatically...... Please correct if I'm wrong. 

Not in the Forum, in the Post Content. As the path is set to wpforo-post-content

the [toc] shortcode is inserted in the post with "p" tag which has "text-align: right" style,

the CSS code hides the content by the tag and it's style, if the content is not added with that style and tag it won't be hidden, 

Posts: 46
Topic starter
(@amitkool21)
Trusted Member
Joined: 3 years ago

what's "p" tag ? 🙁 

2 Replies
Chris
Admin
(@chris)
Joined: 2 years ago

Support Team
Posts: 2779

@amitkool21,

HTML tags: div, p, a, h1 .etc

(@amitkool21)
Joined: 3 years ago

Trusted Member
Posts: 46

@chris Thank you for your help mate.