Home Forums Themes Support Gecko Category text

Tagged: 

This topic contains 9 replies, has 2 voices, and was last updated by  Harry 2 months, 3 weeks ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #20461

    Hello Harry,

    I would like to display text in categories, just above the products (see screenshot) Is this possible somehow?

    Can you tell me what hooks are available and where on the page they appear?

    Thank you!!

    Attachments:
    You must be logged in to view attached files.
    #20483

    Hi,

    Please download attach file and install via Appearance > Themes > Add New

    Best regards

    Attachments:
    You must be logged in to view attached files.
    #20497

    Thanks for immediate reply!

    I already have a child theme activated, should i still do it?  Or i should add it to existing child theme?

    Thanks!

    #20500

    Hi,

    Please add below code to gecko-child > functions.php

    add_action( ‘wp_head’, ‘remove_page_head_category’ );
    function remove_page_head_category(){
    remove_action( ‘woocommerce_before_main_content’, ‘jas_gecko_wc_page_head’, 15 );
    }

    function jas_gecko_child_wc_page_head() {
    	// Remove old position of breadcrumb
    	remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
    	if ( ! cs_get_option( 'wc-enable-page-title' ) || ( class_exists( 'WCV_Vendors' ) && WCV_Vendors::is_vendor_page() ) ) return;
    
    	$title = cs_get_option( 'wc-page-title' );
    
    	$output = '<div class="page-head pr tc"><div class="jas-container pr">';
    		if ( is_search() ) {
    		$output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'gecko' ), '<span>' . get_search_query() . '</span>' ) . '</h1>';
    		} elseif ( is_shop() ) {
    			$output .= '<h1 class="tu mb__10 cw">' . esc_html( cs_get_option( 'wc-page-title' ) ) . '</h1>';
    			//$output .= '<p>' . do_shortcode( cs_get_option( 'wc-page-desc' ) ) . '</p>';
    		} else {
    			// Remove old position of category description
    			//remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
    
    			$output .= '<h1 class="tu mb__10 cw">' . single_cat_title( '', false ) . '</h1>';
    			//$output .= do_shortcode( category_description() );
    		}
    		ob_start();
    			woocommerce_breadcrumb();
    		$output .= ob_get_clean();
    	$output .= '</div></div>';
    
    	echo wp_kses_post( $output );
    }
    add_action( 'woocommerce_before_main_content', 'jas_gecko_child_wc_page_head', 15 );

    and copy file archive-product.php in downloaded file to gecko-child > woocommerce

    Best regards

    #20561

    Hello Harry,

    that partially worked! Category text has changed position and moved, just below breadcrumbs but still not where i wanted it.

    Please check screenshot. I would like it to be placed above products and not full width!

    Is this an easy fix?

    Could you please help me with this!

    Thank you so much!

    #20589

    Hi,

    Please download attach file and extract to gecko-child > woocommerce

    and add below code to JanStudio > Theme Option > General Layout > Custom CSS

    .term-description {
    	padding: 30px 0;
    	max-width: 1170px;
    	margin: 30px auto;
    width: 100%
    }

    Best regards

    Attachments:
    You must be logged in to view attached files.
    #20660

    Hello again,

    It’s almost done but i need some more things.

    1. When shop in left sidebar can product category text be just in page and not full width ( check screenshot)
    2. How can i change background color?

    Thanks!!!!

    Attachments:
    You must be logged in to view attached files.
    #20696
    This reply has been marked as private.
    #20791

    Hello that did the trick!

    thank you very much!

    1. How to change text background color
    2. Is there a way to do it without altering theme’s files but only child theme ? If not I should only replace functions.php and style.css?

    Thank you!!

    #20795

    Hi,

    Please add below code to gecko-child > style.css or JanStudio > Theme Option > General Layout > Custom CSS

    .term-description {background: #f6f6f8;}

    and change #f6f6f8 with your color

    Best regards

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.