• I use under Code
    How can show image in src=”” .help my.please!

    
                            $term_children = get_terms(
                                'category-product',
                                array(
                                    'parent' => get_queried_object_id(),
                                )
                            );
    
                            if ( ! is_wp_error( $terms ) ) {
                                echo '<div class="row">';
                                foreach ( $term_children as $child ) {
                                    echo '
                                        <div class="col-md-4 col-sm-6 col-xs-12">
                                            <div class="item-product">
                                                <div class="item">
                                                    <div class="image">
                                                        <a href="' . get_term_link( $child ) . '"><img alt="' . $child->name . '" src="" class="img-fluid"></a>
                                                    </div>
                                                    <div class="text-wrapp">
                                                        <h3><a href="' . get_term_link( $child ) . '">' . $child->name . '</a></h3>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    ';
                                }
                                echo '</div>';
                            }
    
    
  • The topic ‘show image in loop get term’ is closed to new replies.