php - change wordpress homepage with product -


i have i-craft wordpress theme woocommerce

i set statically homepage themes doesnt work in dashboard

i go te index.php page of theme , change this:

<div class="blog-columns" id="blog-cols">         <?php /* loop normal posts */ ?>         <?php while ( have_posts() ) : the_post(); ?>             <?php get_template_part( 'content', 'single-product-customcateg' ); //get_post_format() ?>         <?php endwhile; ?>         </div> 

with product of woocommerce dont know how can display product

anyone me ? lot

if want emulate how woocommerce displays products via shortcode, this:

<div class="blog-columns" id="blog-cols">     <?php /* loop normal posts */ ?>     <?php while ( have_posts() ) : the_post(); ?>         <?php get_template_part( 'content', 'single-product-customcateg' ); //get_post_format() ?>         <?php echo do_shortcode('[product id="1"]') ?>     <?php endwhile; ?> </div> 

just replace 'id="1"' parameter whatever product id associated product in woocommerce


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -