Before asking the question I want to tell you that I have already asked the question in http://stackoverflow.com/questions/15025213/wordpress-woocommerce-template-file-overiding I am using woocommerce plugin to develop an website. Everything is fine with woocommerce. As per my requirment I have configured my home page as shop base page from woocommerce dashboard to make my home page as shop page. Now my requirment is to place some images which should be uploaded from admin side and have to show some text over the images. For that feature I searched over google and some people suggested me to use wordpress advanced custom fields to be perfect.I just installed it. Now I saw that woocommerce is not using my custom theme. It is using its own custom theme. But as I want to show images and text from advanced custom field plugin and for that I really need my own custom template to use the queries for images and text. Then I again searched over the google for the suggestion and I got some suggestion to just make the copy of themes page.php into woocommerce.php and then just replace the codes
<?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?>
<?php woocommerce_content(); ?>
I also made that but still I am not getting my custom fields for advanced custom field? So kindly help me. Any suggestions and help will be appreciable. Thanks My code to show advanced custom field for image and text is like this
<?php $product_tab_banner = get_field('product_tab_banner'); if($product_tab_banner): ?> <?php var_dump($product_tab_banner); ?> <div class="nt-highlighted-products"> <img src="<?php echo $product_tab_banner['url']; ?>" alt="<?php echo $product_tab_banner['alt']; ?>" width="<?php echo $product_tab_banner['sizes']['featured_product-width'];?>" height="<?php echo $product_tab_banner['sizes']['featured_product-height'];?>" title="<?php echo $product_tab_banner['title']; ?>" /> </div> <?php endif; ?>
I am using wordpress twentyeleven theme.