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

    (@sufyan13)

    <section id=”recent”>

    <ul class=”row-fluid”>

    <?php
    $args = array( ‘post_type’ => ‘product’, ‘stock’ => 1, ‘posts_per_page’ => 3, ‘product_cat’ => ‘new-arrival’, ‘orderby’ =>’date’,’order’ => ‘DESC’ );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>

    <li class=”span3″>
    <h3><?php the_title(); ?></h3>
    ” href=”<?php the_permalink(); ?>” title=”<?php the_title(); ?>”>

    <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, ‘shop_catalog’); else echo ‘<img src=”‘.woocommerce_placeholder_img_src().'” alt=”Placeholder” width=”65px” height=”115px” />’; ?>

    <span class=”price”><?php echo $product->get_price_html(); ?></span>

    <?php /*?><?php woocommerce_template_loop_add_to_cart( $loop->post, $product ); ?><?php */?>
    <!– /span3 –>
    <?php endwhile; ?>
    <?php wp_reset_query(); ?>

    <!– /row-fluid –>
    </section><!– /recent –>

    i have use this code to show products on front end but it is in list view i want to show 3 products in a row

Viewing 1 replies (of 1 total)
  • The topic ‘woocommerce customization’ is closed to new replies.