Notifications
Clear all

Style [Solved] How to hide a specific shortcode

7 Posts
2 Users
2 Reactions
798 Views
Posts: 56
Topic starter
(@amitkool21)
Trusted Member
Joined: 5 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.

6 Replies
Chris
Posts: 3627
(@chris)
Famed Member
Joined: 3 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: 5 years ago

Trusted Member
Posts: 56

@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
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3627

@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: 56
Topic starter
(@amitkool21)
Trusted Member
Joined: 5 years ago

what's "p" tag ? 🙁 

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

Famed Member
Posts: 3627

@amitkool21,

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

(@amitkool21)
Joined: 5 years ago

Trusted Member
Posts: 56

@chris Thank you for your help mate.