Portfolio Page Template Filter Categories

Good day guys,

How to filter Portfolio Category in a Portfolio Page Template?


I have Portfolio 1, Portfolio 2, Portfolio 3 and Show All.

In the Portfolio Page Template lets say General Portfolio Page, I want to show only the Portfolio 1, Portfolio 2 and Show All.

How can i do that? 

Thanks and more power guys!


  • Hi, @patrick_tingson

    Your query is a part of feature enhancement. However, you can get the result via manually code customization in a file.

    But its effect will be on all portfolio related templates i.e. portfolio-4-col.php, portfolio-3-col.php & portfolio-2-col.php

    Create a child theme. Create a new file in it with name content-portfolio.php & paste the code in it from link

    You will notice a line written at the beginning approximately at line no. 5
    $term_args = array('hide_empty' => true, 'orderby' => 'id','exclude' => '5,9');

    Here, '5,9' is the category ID which we want to hide.
    You have to manually put the ID of the category which you want to hide.

    Use Reveal IDs plugin to view category ID in Portfolio Categories section.

    Let me know did it work.


  • Thanks for your response imraz.

    Will update you if this will work. 
  • Hi, @patrick_tingson

    Have you applied the above solution? Let me know did it work.

  • Hello imraz,

    So sorry for the late reply.

    It works BTW.

    Thank you so much!
  • Glad to help you @patrick_tingson

    Any issue later, feel free to ask again!

    We would really appreciate if you could provide us a kind review here:

    Thanks for contacting us :)
This discussion has been closed.