How to make it work with Flatsome theme
-
Hello Everybody! I am trying to make this plugin work on site running on Flatsome theme. I’ve checked everywhere, but I am somehow not able to get any help at all. Following is how my archive-product.php code looks like:
<?php /** * The Template for displaying product archives, including the main shop page which is a post type archive. * * Override this template by copying it to yourtheme/woocommerce/archive-product.php * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } get_header( 'shop' ); // Add Custom Shop Content if set if(is_shop() && flatsome_option('html_shop_page_content') && $wp_query->query_vars['paged'] < 1){ echo do_shortcode('<div class="shop-page-content">'.flatsome_option('html_shop_page_content').'</div>'); } else{ wc_get_template_part( 'layouts/category', flatsome_option('category_sidebar')); } get_footer( 'shop' ); ?>
I’ve realised, this is probably not the file, I am looking for, thus I found one more file by the name “category.php”. And the code inside looks like following:
<div class="row category-page-row"> <div class="col large-3 hide-for-medium <?php flatsome_sidebar_classes(); ?>"> <div id="shop-sidebar" class="sidebar-inner col-inner"> <?php if(is_active_sidebar('shop-sidebar')) { dynamic_sidebar('shop-sidebar'); } else{ echo '<p>You need to assign Widgets to <strong>"Shop Sidebar"</strong> in <a href="'.get_site_url().'/wp-admin/widgets.php">Appearance > Widgets</a> to show anything here</p>'; } ?> </div><!-- .sidebar-inner --> </div><!-- #shop-sidebar --> <div class="col large-9"> <?php /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action( 'woocommerce_before_main_content' ); ?> <?php do_action( 'woocommerce_archive_description' ); ?> <?php if ( have_posts() ) : ?> <?php do_action( 'woocommerce_before_shop_loop' ); ?> <?php woocommerce_product_loop_start(); ?> <?php woocommerce_product_subcategories(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php wc_get_template_part( 'content', 'product' ); ?> <?php endwhile; // end of the loop. ?> <?php woocommerce_product_loop_end(); ?> <?php /** * woocommerce_after_shop_loop hook * * @hooked woocommerce_pagination - 10 */ do_action( 'woocommerce_after_shop_loop' ); ?> <?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?> <?php wc_get_template( 'loop/no-products-found.php' ); ?> <?php endif; ?> <?php do_action('flatsome_products_after'); /** * woocommerce_after_main_content hook * * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content) */ do_action( 'woocommerce_after_main_content' ); ?> </div> </div>
Can somebody, kindly please hand-hold me, as to what and where exactly do I need to add the Ajax Load More Shortcode? By the way, if at all it helps, then this is the page where I am trying to make changes: https://www.wethechic.com/product-tag/game-of-thrones/
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘How to make it work with Flatsome theme’ is closed to new replies.