-
-
Can you guide me as to which php file and what lines of code to change to set the default category for the portfolio page (i.e. not All)?
I assume that I will have to set the slug name somewhere.
Thank you
-
Hello,
The responsible code snipped is located in file portfolio.php.
Best regards!
-
Sorry. Could you give me some more detail like a code snippet to get me started?
Thank you,
Leo
-
Hello,
Look for these lines:
<nav id="portfolio-filter" class="span12"> <ul class=""> <li class="filter active all" data-filter="all"><a href="#" class="filter active" data-filter="all"><?php _e('View All', 'codeless') ?></a></li> <?php foreach($cl_redata['portfolio_categories'] as $cat): ?> <?php $cat = get_term($cat, 'portfolio_entries'); ?> <?php if(is_object($cat)): ?> <li class="other filter" data-filter=".<?php echo esc_attr($cat->slug) ?>"><a href="#" class="filter" data-filter=".<?php echo esc_attr($cat->slug) ?>"><?php echo esc_html($cat->name) ?></a></li> <?php endif; ?> <?php endforeach; ?> </ul> </nav>
Best regards!
-
-
Hello,
This block of code is responsible for the generation of categories filter bar in portfolio pages. This line:
<li class="filter active all" data-filter="all"><php _e('View All', 'codeless') ></li>
will display the “View All” (first tab). This is what you have to change. Edit
data-filter="all"
to the category you want to show.While this cycle here:
<li class="other filter" data-filter=".<php echo esc_attr($cat->slug) ?>"><a href="#" class="filter" data-filter=".<php echo esc_attr($cat->slug) ?>"><php echo esc_html($cat->name) ?></a></li>
will automatically list out all the available categories after the “View All” tab.
Hide the category displayed first, from this list with custom css.Sorry but this is a custom edit and it’s not included in support service. This is all i can help you with.
Please read more regarding our support policy here.Best regards!
-
You must be logged in to reply to this topic.