Jump to content
Sign in to follow this  
robmat79

Selective post meta

Recommended Posts

robmat79

Hi there, Is it possible to hide post meta selectively dependent say on category or specific posts? Thanks!

Share this post


Link to post
Share on other sites
cshoffmann

Are you asking specifically about the Platform Pro Meta options? If not, I use the All in One SEO pack to control meta.

Share this post


Link to post
Share on other sites
ricardo

Hi Robert! There are a couple of ways to do it: CSS and templates. Both have pros and cons so weight them before choosing. Doing it with templates is 10x more complicated than CSS so I'm not even going to explain it. With CSS you can do both but to apply it to specific posts you will have to add each post ID to the rule. If you post seldom, it's doable but if you post often, this will add a handfull of new steps to the posts creation process. For categories add the following to your Custom CSS Rules in Custom Code (32 and 33 are the category ids):

body.category-32 .metabar, body.category-33 .metabar { display: none; }
For posts use the following (53 and 54 are the post ids):
body.postid-53 .metabar, body.postid-54 .metabar { display: none; }
and whenever you want to apply it to a new post, add "body.postid-x .metabar" to the existing rule. If want want to apply it to categories and posts, you can (and should) gather them under the same rule, like this:
body.category-32 .metabar, body.category-33 .metabar, body.postid-53 .metabar, body.postid-54 .metabar { display: none; }

Ricardo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×