• 0
Sign in to follow this  
Followers 0

Feature on Category Page

Question

Posted · Report post

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

7 answers to this question

  • 0

Posted · Report post

Hi Indakno, This isn't currently possible and has been added to our tracker as a feature request.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thank You. Please keep me posted.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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  
Followers 0