Support

Account

Home Forums Add-ons Repeater Field Take te cuttently taxonomia compare with taxonomia field

Unread

Take te cuttently taxonomia compare with taxonomia field

  • I tried to show just products of the current category in page category.php.

    <?php if (get_sub_field(‘categoria_produtos->name’) == ‘take currently category’): ?>

    ‘categoria_produtos->name’ = name the product category

    The code above I use for taking name current category, but it doesn’t work when I use the variable $current_cat->name inside the loop statement.
    <?php

    $category = get_query_var(‘cat’);
    $current_cat = get_category($cat);
    echo $current_cat->name;
    ?>

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.