[Resolved] Niche theme – Woocommerce : show categories in wc pages

Home Forums Support Niche theme – Woocommerce : show categories in wc pages

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #1365463

    Hi Tom, David and Leo (I don’t know if I’m missing someone)

    First of all, we really appreciate the work you are doing with GP πŸ™‚

    To the point, I’ve tried to find the solution in the forum, but I couldnt. We are running Niche theme, and we’ld like to show the woocommerce product categories in shop pages (shop index, single product, and I any other wc page)

    I’ve checked and we have the “Woocommerce Shop Category Menu” Element enabled (see below). As far as I checked the code is not generated in the html. I don’t know what we are doing wrong. Can you help us? Or any idea how to proceed?
    Thank you in advance

    $cat_args = array(
    	'orderby'    => 'name',
    	'order'      => 'asc',
    	'hide_empty' => false,
    $product_categories = get_terms( 'product_cat', $cat_args );
    if ( ! empty( $product_categories ) ) {
    	echo '<ul class="woo-cat-nav">';
    		foreach ( $product_categories as $key => $category ) {
    					<a href="%1$s">
    				get_term_link( $category ),
    	echo '</ul>';


    Hook woocommerce_archive_description
    Execute PHP YES
    Display Rules

    • Product Category Archive: All Product Categories
    • Product Archive
    Customer Support

    Hi there,

    Lets test if the hook is where it should be.
    In your hook code above, just before the <?php add:

    <h2>The hook is working</h2>

    If that displays on the front end we know the hook is working. Let me know. Then we can look at why the codes conditions aren’t being met


    Hi David,
    Nope, it doesn’t display it

    Customer Support

    That means that either:

    1. The Display Rules are not working.
    2. The Hook is missing.

    Lets test #1 – by adding Entire Site to the Hooks Display Rules.

    Let me know.


    Ok, adding to display for the entire site didn’t work

    Customer Support

    Now try changing the hook to after_header
    Keep the Display Rules as is.
    And keep the <h2>The hook is working</h2> in there.


    Ok, I’ve got something πŸ™‚
    Changing the hook to after_header make it appear in the single product page. Not in the shop page. Even more, it appeared all the categories. You can check by yourself in the provided link

    Customer Support

    OK – something else must be interfering.
    Are you using a Child Theme ? If so can you temporarily disable it.

    Next step is to disable any other plugins or custom functions to see if there is a conflict.


    It was the plugin “Productos sin stock” (that orders the WC products with no stock at last position)
    Thank you David!

    Customer Support

    Glad to hear you found the issue.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.