Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter luuducthuy

    (@luuducthuy)

    Thanks you Pauls. But it’s not i need.

    I do not display for each product category. I’ve tried several ways but could not. I do not know how. That is when I click on a category, then it does not display the products in that category as a default post.

    I’ts my problem i had.

    Please, help me.
    MY CODE DISPLAY PRODUCT ON CATEGORY. I wrote in category.php.

    <?php query_posts( array( 'post_type' => 'product', 'media' => 'print','post_per_page'=>-1,'caller_get_posts'=>1 ) );?>
                            <div class="l_product">
                               <?php if(have_posts()) : while(have_posts()) : the_post() ;?>
                            	<div class="product">
                                	<a>">
                                        <?php
        									if(has_post_thumbnail()){
        										the_post_thumbnail();
        									}
        							     ?>
                                    </a>
                                    <div class="m-shadow"></div>
                                    <h4 class="cut_text"><a>" title="<?php the_title_attribute(); ?>"><?php the_title()?></a></h4>
                                    <p class="price">Giá: <?php echo get_the_term_list($post->ID, 'gia', '', '', '');?> VND/m2 </p>
                                </div>
    
                               <?php endwhile;?>
                               <?php else: ?>
              					<p>Hi?n t?i ch?a có s?n ph?m m?i nào ???c ??ng lên website </p>
             				   <?php endif;
                                wp_reset_query();
                                ?>
                            </div><!-- .l_s_product -->

    [ Please do not bump, it’s not permitted here. ]

Viewing 1 replies (of 1 total)