• Resolved theblueli

    (@theblueli)


    Hello, any idea why when the Redis is enabled, Below get_terms I use, empty terms are not going to be hidden. If I disable Redis, the code works fine. Any idea what may go wrong? thanks

    
    $parentid = 175;
    $args = array(
    'parent' => $parentid
    );
    $terms = get_terms( 'product_cat', $args );
    if ( $terms ) {
    echo '<ul>';
    foreach ( $terms as $term ) {
        echo '<li>';
            echo '<a href="' . esc_url( get_term_link( $term ) ) . '" class="' . $term->slug . '">';
                echo $term->name;
            echo '</a>';
        echo '</li>';
    }
    echo '</ul>';
    }
    
    • This topic was modified 2 years, 8 months ago by theblueli.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘When Redis is enabled, hidden_empty => true is not working’ is closed to new replies.