Jump to content
Sign in to follow this  
urbanimatic

Removing Meta Info from Custom Post Type

Recommended Posts

Rob
Stelios, a live link helps much more, but I see your problem. I think this question should really be answered by the plugin developer as it's not really PageLines placing that meta data there. If you have [url="http://www.getfirebug.com"]Firebug for Firefox[/url], you should be able to see the CSS selectors for the meta bar and use a hide command to prevent them, however the developer may have an easier solution, such as commenting out the meta bar in one of their code pages.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
urbanimatic
Hi rangelone, But if i uncheck meta info from platform pro settings it also removes the ones in products as well as blog posts.

Share this post


Link to post
Share on other sites
Simon
The post metabar has a filter 'pagelines_post_metabar' You can use this with $post->post_type and if it matches you posttype just return empty.

Share this post


Link to post
Share on other sites
urbanimatic
Hi Simon, Can you explain how and where should i use it ? Thanks

Share this post


Link to post
Share on other sites
Simon
Well an example would be in platformbase/functions.php [code]add_filter( 'pagelines_post_metabar', 'metabar_shop_remove' ); functions metabar_shop_remove( $metabar ) { global $post; if ( $post->post_type == 'POSTTYPE' ) { return; } return $metabar; }[/code] replace POSTTYPE with whatever the post type is, should return a blan metabar if it matches. I dont know what the posttype is, maybe you could ask the plugin author but this should get you going.

Share this post


Link to post
Share on other sites
urbanimatic
Hi Simon, That's awesome thank you very much. That works fine if anyone need it in the future...just 2 small typos: 1) A space is needed between "add_filter" and "(" 2) And in the second line: "functions" needs to be "function" so the code is: [code] add_filter ( 'pagelines_post_metabar', 'metabar_shop_remove' ); function metabar_shop_remove( $metabar ) { global $post; if ( $post->post_type == 'POST TYPE NAME' ) { return; } return $metabar; } [/code] p.s. wp ecommerce custom post type name for products is wpsc-product if anyone needs it. Thanks on more time Stelios

Share this post


Link to post
Share on other sites
Simon
Thx for the typo ;) pps. You dont actually need a space between function and the () ;)

Share this post


Link to post
Share on other sites
urbanimatic
No problem. space between add_filter and ( ...not function

Share this post


Link to post
Share on other sites
Simon
add_filter() is a wordpress function ;) add_filter( 'pagelines_post_metabar', 'metabar_shop_remove' ); add_filter ('pagelines_post_metabar', 'metabar_shop_remove'); even add_filter ('pagelines_post_metabar', 'metabar_shop_remove'); PHP does not care about spaces too much

Share this post


Link to post
Share on other sites
urbanimatic
My mistake, sorry. Thanks for all the help.

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  

×