Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ravihumint

    (@ravihumint)

    By the way, I am really sorry. I am probably asking for a lot. But you see I am not too familiar with PHP, thus finding these things a bit challenging. And again not really patronising but I really found your plugin quite sleek and sophisticated, thus would love to have this working on this site.

    Thread Starter ravihumint

    (@ravihumint)

    Alright! I replaced the code as you suggested with the following code:

    <?php
        $obj = get_queried_object();
        $taxonomy = $obj->taxonomy;
        $taxonomy_term = $obj->slug;
        echo do_shortcode('[ajax_load_more post_type="product" taxonomy="'. $taxonomy .'" taxonomy_terms="'. $taxonomy_term .'" taxonomy_operator="IN" css_classes="products" repeater="default"]');
    ?>

    I also copied the contents of “content-product_cat.php” file to the “default.php” file inside repeater folder. But now none of the products are visible on any of the pages. Please check – https://www.wethechic.com/product-tag/big-bang-theory/

    Thread Starter ravihumint

    (@ravihumint)

    The only remaining file that I think might be the real product archive file in flatsome theme is following; please help me and let me know if this indeed the one we are looking for? The name of the file is content-product_cat.php, and following is it’s content:

    <?php
    /**
     * The template for displaying product category thumbnails within loops
     *
     * This template can be overridden by copying it to yourtheme/woocommerce/content-product_cat.php.
     *
     * HOWEVER, on occasion WooCommerce will need to update template files and you
     * (the theme developer) will need to copy the new files to your theme to
     * maintain compatibility. We try to do this as little as possible, but it does
     * happen. When this occurs the version of the template file will be bumped and
     * the readme will list any important changes.
     *
     * @see     https://docs.woothemes.com/document/template-structure/
     * @author  WooThemes
     * @package WooCommerce/Templates
     * @version 2.6.1
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly
    }
    
    $cat_style = flatsome_option('cat_style');
    $color = '';
    $text_pos = '';
    
    if($cat_style == 'overlay' || $cat_style == 'shade'){
    	$color = 'dark';
    }
    if($cat_style == 'overlay'){
    	$text_pos = 'box-text-middle text-shadow-5';
    }
    if($cat_style == 'badge'){
    	$text_pos .= ' hover-dark';
    }
    
    $classes = array('product-category','col');
    
    ?>
    <div <?php wc_product_cat_class( $classes, $category ); ?>>
    <div class="col-inner">
    	<?php do_action( 'woocommerce_before_subcategory', $category ); ?>
    
    		<div class="box box-<?php echo $cat_style; ?>  <?php echo $text_pos;?> <?php echo $color; ?>">
    		<div class="box-image">
    			<?php
    				/**
    				 * woocommerce_before_subcategory_title hook
    				 *
    				 * @hooked woocommerce_subcategory_thumbnail - 10
    				 */
    				do_action( 'woocommerce_before_subcategory_title', $category );
    			?>
    			<?php if($cat_style == 'overlay'){ ?><div class="overlay"></div><?php } ?>
    			<?php if($cat_style == 'shade'){ ?><div class="shade"></div><?php } ?>
    		</div><!-- box-image -->
    		<div class="box-text text-center">
    			<div class="box-text-inner">
    					<h5 class="uppercase header-title">
    	       					<?php echo $category->name; ?>
    					</h5>
    					<p class="is-xsmall uppercase count">
    						<?php if ( $category->count > 0 ) echo apply_filters( 'woocommerce_subcategory_count_html', ' ' . $category->count . ' '.__('Products','woocommerce').'', $category); ?>
    					</p>
    					<?php
    						/**
    						 * woocommerce_after_subcategory_title hook
    						 */
    						do_action( 'woocommerce_after_subcategory_title', $category );
    					?>
    
    			</div><!-- .box-text-inner -->
    		</div><!-- .box-text -->
    		</div>
    
    	<?php do_action( 'woocommerce_after_subcategory', $category ); ?>
    </div>
    </div>
    Thread Starter ravihumint

    (@ravihumint)

    As I pasted above. I think category.php is the file/code which is driving this link: https://www.wethechic.com/product-tag/game-of-thrones/. If that’s not really the case, then I am completely lost here ??

    • This reply was modified 6 years, 10 months ago by ravihumint.
Viewing 4 replies - 1 through 4 (of 4 total)