Portfolio Filters in PRO

Is this still unusable? I ask because it’s been a year since this thread: https://theme.co/apex/forum/t/portfolio-filters-with-pro/2083

Can someone explain why it won’t work with Portfoio CPT when I have added filters (using the same ‘x’ version of Isotope that comes with the theme) to other CPTs (happy to provide examples etc.); what’s so special about Portfolio (or should I ignore and solve it myself?)?

Hi @sguilliard,

Thanks for reaching out.

That’s a year ago and yes, it’s been already implemented as a shortcode :slight_smile: . Please a text element in your header and add this shortcode.

[x_portfolio_filters]

It can’t be automatically added since custom headers are meant to be built from scratch.

Thanks!

OK, I’m guessing that it’s still ok to edit the porfolio template pages (in a child theme of course) to hard code this with do_shortcode?

Hi There @sguilliard

Since you’re using child theme, you can test it by adding your customizations to the child theme.

Thanks!

Ok, so I tried editing the ‘Portfolio’ page in PRO and adding the text element as you describe. This didn’t work as there’s no content area in the template files (which I suspected before I started, but tried it anyway) and I don’t want to create a new header just for this purpose.

I’ve added the following code to the VIEWS/INTEGRITY/TEMPLATE-LAYOUT-PORTFOLIO.PHP file:

<div class="th-development-filters">
  <?php echo do_shortcode('[x_portfolio_filters]'); ?>
</div>

I also had to add some CSS to override some inline CSS that was hiding the buttons with a display: none; with the following CSS (the first line being necessary to centre the button):

.th-development-filters > ul.option-set > li {
text-align: center;
}
.th-development-filters > ul.option-set > li > a.x-portfolio-filters {
display: inline-block;
}

I hope this is useful to anyone else who wants to do the same…

Glad that you figured out the solution and thanks a lot for sharing the same with community members. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.