Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    WooCommerce already outputs descriptions above taxonomy archives for tags and categories.

    The theme I’ve installed (Chandelier) doesn’t display Product-tag descriptions on Product-tag pages, nor does it display product-category descriptions on the product-category page. I need to get both to display, can anyone please explain what code I need to use, and where, to get them to display please?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Add this to your template file in the theme:

    woocommerce_taxonomy_archive_description();

    thank you Mike, please can you tell me what file I should add this code to, and where I would likely find that file? (I’m not an expert)

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    archive-product.php I think. See what files your theme has inside.

    Im almost there now, thank you, I’ve found a file called content-product.php ( it says that it is for displaying content within loops) and I’ve added your code to it.

    I first tried adding it above the line
    <?php do_action( 'woo commerce_before_shop_loop_item' ); ?>

    as this looked logical to me as I want the description to show above the products.

    But it showed the description for the category over each product. So I moved the code to the very top of the file above everything else, it shows the description over and over again (once for each product)
    The first one is in the right place, then it shows the first product, and then the description over and over to the right hand side after the first product.

    Please can you tell me which file pulls in the content-product.php so that I can put your code in the line above that?

    there wasn’t an archive-product.php file in the theme woo commerce folder, I tried copying it there from the woo commerce folder but it doesn’t do anything, with or without that line in it. I can only seem to get the description text to show by adding it to the content-product.php file, but then it loops and repeats for each product.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Content-product was not right. That is each item on the page. Post your system status report here so I can see what template files are available.

    Thank you so much, I’m just looking to see where to get the system status report for you from, and then I will post it up.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    ### WordPress Environment ###
    
    Home URL: https://cameo-boutique.com.gridhosted.co.uk
    Site URL: https://cameo-boutique.com.gridhosted.co.uk
    WC Version: 2.5.3
    Log Directory Writable: ?  /var/sites/c/cameo-boutique.com/public_html/wp-content/uploads/wc-logs/
    WP Version: 4.4.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    Language: en_GB
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 5.4.42
    PHP Post Max Size: 100 MB
    PHP Time Limit: 180
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 5.6.21
    Max Upload Size: 100 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 2.5.3
    :
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_termmeta: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    
    ### Active Plugins (8) ###
    
    Contact Form 7: by Takayuki Miyoshi – 4.4
    Elated Core: by Elated Themes – 1.0.1
    Elated Instagram Feed: by Elated Themes – 1.0.1
    WPBakery Visual Composer: by Michael M - WPBakery.com – 4.9.1
    Limit Login Attempts: by Johan Eenfeldt – 1.7.1
    Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 2.2.6
    WooCommerce: by WooThemes – 2.5.3
    WooSidebars - Sidebar Manager to WooSidebars Converter: by WooThemes – 1.1.2
    
    ### Settings ###
    
    Force SSL: –
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    
    ### API ###
    
    API Enabled: ?
    API Version: 3.1.0
    
    ### WC Pages ###
    
    Shop Base: #5 - /shop/
    Basket: #6 - /basket/
    Checkout: #7 - /checkout/
    My Account: #8 - /my-account/
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    ### Theme ###
    
    Name: Chandelier
    Version: 1.1
    Author URL: https://themeforest.net/user/elated-themes
    Child Theme: ? – If you're modifying WooCommerce on a parent theme you didn't build personally
    then we recommend using a child theme. See: How to create a child theme
    
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: chandelier/woocommerce/archive-product.php
    chandelier/woocommerce/cart/cart-shipping.php version 2.3.0 is out of date. The core version is 2.5.0
    chandelier/woocommerce/cart/cart-totals.php
    chandelier/woocommerce/cart/cart.php
    chandelier/woocommerce/cart/shipping-calculator.php
    chandelier/woocommerce/content-product.php version 2.4.0 is out of date. The core version is 2.5.0
    chandelier/woocommerce/content-single-product.php
    chandelier/woocommerce/content-widget-product.php version - is out of date. The core version is 2.5.0
    chandelier/woocommerce/global/quantity-input.php version 2.1.0 is out of date. The core version is 2.5.0
    chandelier/woocommerce/product-searchform.php version - is out of date. The core version is 2.5.0
    chandelier/woocommerce/single-product/add-to-cart/external.php
    chandelier/woocommerce/single-product/add-to-cart/grouped.php
    chandelier/woocommerce/single-product/add-to-cart/simple.php
    chandelier/woocommerce/single-product/meta.php
    chandelier/woocommerce/single-product/product-image.php
    chandelier/woocommerce/single-product/rating.php
    chandelier/woocommerce/single-product/related.php
    chandelier/woocommerce/single-product/tabs/tabs.php
    chandelier/woocommerce/single-product-reviews.php
    
    : Learn how to update outdated templates

    one this is resolved I would like to delete the URL from the post above please

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    chandelier/woocommerce/archive-product.php is there, so that should be fine.

    Unless your theme has some taxonomy-x.php templates too?

    I doesn’t seem to have either, I can find taxonomy-product files in the plugins>Woocommerce folder, but not in the themes>Chandelier>Woocommerce folder

    The only files in there are:
    content-product.php
    content-widget-
    single product-
    content-single-
    product-search-

    also folders called “global” “single-product” & “cart”

    I found someone with a similar problem here:

    https://www.ads-software.com/support/topic/archive-productphp-template-overwrite-not-working?replies=8

    They say :

    Issue: archive-product.php custom template would get completely ignored.

    Problem: woocommerce-template.php, woocommerce_content() function is wrong for any archive product case.

    quick solution: on your woocommerce.php template you created instead of
    woocommerce_content();
    use this logic:

    if ( is_singular( ‘product’ ) ) {
    woocommerce_content();
    }else{
    //For ANY product archive.
    //Product taxonomy, product search or /shop landing
    woocommerce_get_template( ‘archive-product.php’ );
    }
    This will call your woo template, that would be YOURTHEME/ woocommerce/ archive-product.php and you wont have to edit any file inside the plugin folder

    I hope this helps anyone with a similar problem that did not buy their theme.“

    So I have copied the file: archive-product.php in to the themes>Chandelier>Woocommerce folder and added your line of code to it above the line: woo commerce_product_loop_start();

    I have then edited the woocommerce.php file from the Chandelier folder as follows:

    <?php
    /*
    Template Name: WooCommerce
    */
    ?>
    <?php
    
    global $woocommerce;
    
    $id = get_option('woocommerce_shop_page_id');
    $shop = get_post($id);
    $sidebar = chandelier_elated_sidebar_layout();
    
    if(get_post_meta($id, 'eltd_page_background_color', true) != ''){
    	$background_color = 'background-color: '.esc_attr(get_post_meta($id, 'eltd_page_background_color', true));
    }else{
    	$background_color = '';
    }
    
    $content_style = '';
    if(get_post_meta($id, 'eltd_content-top-padding', true) != '') {
    	if(get_post_meta($id, 'eltd_content-top-padding-mobile', true) == 'yes') {
    		$content_style = 'padding-top:'.esc_attr(get_post_meta($id, 'eltd_content-top-padding', true)).'px !important';
    	} else {
    		$content_style = 'padding-top:'.esc_attr(get_post_meta($id, 'eltd_content-top-padding', true)).'px';
    	}
    }
    
    if ( get_query_var('paged') ) {
    	$paged = get_query_var('paged');
    } elseif ( get_query_var('page') ) {
    	$paged = get_query_var('page');
    } else {
    	$paged = 1;
    }
    
    get_header();
    
    get_template_part( 'title' );
    get_template_part('slider');
    
    $full_width = false;
    
    if ( chandelier_elated_options()->getOptionValue('eltd_woo_products_list_full_width') == 'yes' && !is_singular('product') ) {
    	$full_width = true;
    }
    
    if ( $full_width ) { ?>
    	<div class="eltd-full-width" <?php chandelier_elated_inline_style($background_color); ?>>
    <?php } else { ?>
    	<div class="eltd-container" <?php chandelier_elated_inline_style($background_color); ?>>
    <?php }
    		if ( $full_width ) { ?>
    			<div class="eltd-full-width-inner" <?php chandelier_elated_inline_style($content_style); ?>>
    		<?php } else { ?>
    			<div class="eltd-container-inner clearfix" <?php chandelier_elated_inline_style($content_style); ?>>
    		<?php }
    
    			//Woocommerce content
    			if ( ! is_singular('product') ) {
    
    				switch( $sidebar ) {
    
    					case 'sidebar-33-right': ?>
    						<div class="eltd-two-columns-66-33 grid2 eltd-woocommerce-with-sidebar clearfix">
    							<div class="eltd-column1">
    								<div class="eltd-column-inner">
    									<strong><?php if ( ! is_singular('product') ) { chandelier_elated_woocommerce_content();
    }else{
    woocommerce_get_template( 'archive-product.php' );
    }?></strong>
    								</div>
    							</div>
    							<div class="eltd-column2">
    								<?php get_sidebar();?>
    							</div>
    						</div>
    					<?php
    						break;
    					case 'sidebar-25-right': ?>
    						<div class="eltd-two-columns-75-25 grid2 eltd-woocommerce-with-sidebar clearfix">
    							<div class="eltd-column1 eltd-content-left-from-sidebar">
    								<div class="eltd-column-inner">
    									<?php chandelier_elated_woocommerce_content(); ?>
    								</div>
    							</div>
    							<div class="eltd-column2">
    								<?php get_sidebar();?>
    							</div>
    						</div>
    					<?php
    						break;
    					case 'sidebar-33-left': ?>
    						<div class="eltd-two-columns-33-66 grid2 eltd-woocommerce-with-sidebar clearfix">
    							<div class="eltd-column1">
    								<?php get_sidebar();?>
    							</div>
    							<div class="eltd-column2">
    								<div class="eltd-column-inner">
    									<?php chandelier_elated_woocommerce_content(); ?>
    								</div>
    							</div>
    						</div>
    					<?php
    						break;
    					case 'sidebar-25-left': ?>
    						<div class="eltd-two-columns-25-75 grid2 eltd-woocommerce-with-sidebar clearfix">
    							<div class="eltd-column1">
    								<?php get_sidebar();?>
    							</div>
    							<div class="eltd-column2 eltd-content-right-from-sidebar">
    								<div class="eltd-column-inner">
    									<?php chandelier_elated_woocommerce_content(); ?>
    								</div>
    							</div>
    						</div>
    					<?php
    						break;
    					default:
    						chandelier_elated_woocommerce_content();
    				}
    
    			} else {
    				chandelier_elated_woocommerce_content();
    			} ?>
    
    			</div>
    	</div>
    <?php get_footer(); ?>

    But it still hasn’t made any difference, please can you tell me what to do next?

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Product tag description’ is closed to new replies.