Skip to content

Instantly share code, notes, and snippets.

@HelloAlberuni
Last active September 14, 2017 08:26
Show Gist options
  • Save HelloAlberuni/b080acf939cf791c6edaba689f52bcd6 to your computer and use it in GitHub Desktop.
Save HelloAlberuni/b080acf939cf791c6edaba689f52bcd6 to your computer and use it in GitHub Desktop.
if All is selected
$cat_list = get all terms
else
$cat_list = get selected terms
endif
<div class="tab_menu">
<ul>
foreach $cat_list
render category info
<li>test_1</li>
end foreach
</ul>
</div>
<div class="tab_wrapper">
<div class="tab_content">
foreach $cat_list
get the current category slug
<div class="test_1">
<div class="products">
make a custom query with modifying tax_query only with current cat slug
run while
render product data
<div class="">product_1</div>
end while
reset post data
</div>
</div>
end foreach
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment