Title: Sufyan's Replies | WordPress.org

---

# Sufyan

  [  ](https://wordpress.org/support/users/sufyan13/)

 *   [Profile](https://wordpress.org/support/users/sufyan13/)
 *   [Topics Started](https://wordpress.org/support/users/sufyan13/topics/)
 *   [Replies Created](https://wordpress.org/support/users/sufyan13/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/sufyan13/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/sufyan13/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/sufyan13/engagements/)
 *   [Favorites](https://wordpress.org/support/users/sufyan13/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [One-category-frontpage and one-category-archive](https://wordpress.org/support/topic/one-category-frontpage-and-one-category-archive/)
 *  [Sufyan](https://wordpress.org/support/users/sufyan13/)
 * (@sufyan13)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/one-category-frontpage-and-one-category-archive/#post-6098730)
 * hi,
    try this code
 * <?php
    $my_query = new WP_Query(‘cat=[ID]&post_count=5’); ?>
    -  <?php
       while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate
      = $post->ID;?> <h3><?php the_title(); ?></h3> <p><?php the_content(); ?></
      p> <?php endwhile; ?>
 * hopefully it will work
    regards
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Post Next] woocommerce customization](https://wordpress.org/support/topic/woocommerce-customization-3/)
 *  Thread Starter [Sufyan](https://wordpress.org/support/users/sufyan13/)
 * (@sufyan13)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/woocommerce-customization-3/#post-6103427)
 * <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
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [One-category-frontpage and one-category-archive](https://wordpress.org/support/topic/one-category-frontpage-and-one-category-archive/)
 *  [Sufyan](https://wordpress.org/support/users/sufyan13/)
 * (@sufyan13)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/one-category-frontpage-and-one-category-archive/#post-6098625)
 * which theme you are using??
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [One-category-frontpage and one-category-archive](https://wordpress.org/support/topic/one-category-frontpage-and-one-category-archive/)
 *  [Sufyan](https://wordpress.org/support/users/sufyan13/)
 * (@sufyan13)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/one-category-frontpage-and-one-category-archive/#post-6098621)
 * make a category and edit your posts one by one and select that category for every
   post
    display your posts category wise on front end
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [One-category-frontpage and one-category-archive](https://wordpress.org/support/topic/one-category-frontpage-and-one-category-archive/)
 *  [Sufyan](https://wordpress.org/support/users/sufyan13/)
 * (@sufyan13)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/one-category-frontpage-and-one-category-archive/#post-6098598)
 * hi,
    try to add the posts that you want to show on page in a category for example
   2014 and set this category to show… thnks

Viewing 5 replies - 1 through 5 (of 5 total)