Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ওকমার্স নিয়ে কিছু টিপস
- ==============================
- সব শর্টকোড
- ========================
- http://docs.woothemes.com/document/woocommerce-shortcodes/
- [featured_products per_page="12" columns="3"]
- রিসেণ্ট প্রোডাক্ট আনার জন্য
- ================================
- <section id="recent">
- <h1>Recently Added</h1>
- <ul class="row-fluid">
- <?php
- $args = array( 'post_type' => 'product', 'stock' => 1, 'posts_per_page' => 4, 'orderby' =>'date','order' => 'DESC' );
- $loop = new WP_Query( $args );
- while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
- <li class="span3">
- <a id="id-<?php the_id(); ?>" 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" />'; ?>
- <h3><?php the_title(); ?></h3>
- <span class="price"><?php echo $product->get_price_html(); ?></span>
- </a>
- <?php woocommerce_template_loop_add_to_cart( $loop->post, $product ); ?>
- </li><!-- /span3 -->
- <?php endwhile; ?>
- <?php wp_reset_query(); ?>
- </ul><!-- /row-fluid -->
- </section><!-- /recent -->
- ফিচার প্রোডাক্ট অ্যাড করার জন্য
- ============================================
- <?php
- $args = array( 'post_type' => 'product', 'meta_key' => '_featured','posts_per_page' => 15,'columns' => '3', 'meta_value' => 'yes' );
- $loop = new WP_Query( $args );
- while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
- <li class="product">
- <a href="<?php echo get_permalink( $loop->post->ID ) ?>" title="<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>">
- <h3><?php the_title(); ?></h3><br /><span class="price"><?php echo $product->get_price_html(); ?></span><br />
- <?php woocommerce_show_product_sale_flash( $post, $product ); ?>
- <?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="300px" height="300px" />'; ?></a>
- <span class="motangan"><?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?></span><br />
- </li>
- <?php
- /**
- * woocommerce_pagination hook
- *
- * @hooked woocommerce_pagination - 10
- * @hooked woocommerce_catalog_ordering - 20
- */
- do_action( 'woocommerce_pagination' );
- ?>
- <?php endwhile; ?>
- <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement