Jump to content
Sign in to follow this  
indakno

Feature on Category Page

Recommended Posts

indakno    0
indakno

I have the feature section showing on the Category page. How do I get the feature to show only the features of that particular category?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny
Hi Indakno, This isn't currently possible and has been added to our tracker as a feature request.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
indakno    0
indakno
Thank You. Please keep me posted.

Share this post


Link to post
Share on other sites
Simon    247
Simon
Actually it is possible, all PageLines options are filterable! This is a very powerful filter ;) So the option in question is [b]feature_category[/b] so we have to use a filter called [b]ploption_feature_category[/b] which will overide the category you have set. Then in the filter we will just feed it with whatever the current category is. Here is the code, add it to the customize plugin functions.php [code]add_filter( 'ploption_feature_category', 'make_cat_features', 10, 2); function make_cat_features( $key, $o) { global $wp_query; $category = $wp_query->query_vars['cat']; return $category; }[/code]

Share this post


Link to post
Share on other sites
indakno    0
indakno
So, how does this work for each different category page? I have about 11 or 13 different categories. Or does it automatically pull the correct category features? Thanks for your help.

Share this post


Link to post
Share on other sites
Rob    547
Rob
Simon's code picks up the features from the category where the slider appears, so in reply to your last question, yes it does. In response to the first... trust that if Simon says... it works. After all, he wrote most of it.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
indakno    0
indakno
Ok. I will try it and see how it goes and let you guys know. Thanks!

Share this post


Link to post
Share on other sites
indakno    0
indakno
IT WORKED!!!!! Thanks guys.

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  

×