Home Forums Themes Support Claue Modify Category Header

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

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #33660

    Hi Harry,

    another thing.

    I want basically that on the shop category-, tag-, as well on the attribute-archives that the grey bar should go away. Can we modify something in the archive-product.php (and some small CSS) to only have the title displayed in black?

    When you access the shop page on mobile – you see how I actually want it. Now I have this background just not shown (hidden via CSS) but actually I just want to get rid of the code so that the background picture on the categories is not loading in the back anymore.

    This standard grey bar (when no background picture is set) can easily be overwritten with CSS or would it be better to change the code there as well?

    Thanks.

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

    You know the main thing is, I actually want to keep the category background picture in case I will insert categories via shortcode somewhere in the future, but the category pictures should not load on the product-category page. So basically the code have to be changed to “not load product-category picture in header”.

    #33676

    Hi Florian,

    Please add below code to Claue > Theme Option > General Layout > Custom CSS

    .archive.post-type-archive .page-head::before,
    .archive tax-product_cat .page-head::before {
    	background: none;
    	padding: 10px 0;
    }
    .archive.post-type-archive .page-head h1,
    .archive tax-product_cat .page-head h1 {
    	color: #222;
    }

    Btw, your support expired. Could you please renew your support at https://themeforest.net/item/claue-clean-minimal-woocommerce-theme/18929281 that will help us continue develop new features and improve our theme.

    Thank and regards

    Harry
    Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    #33677

    Hi Harry,

    Thank you for the answer. This is totally CSS solution. Can you please double read my question one time. Thank you.

    And I purchased new support a couple months ago and still have 2 months left. Please see screenshot

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

    Hi Florian.

    You mean you want remove background image on shop page but still keep in category page or complete remove all?

    Harry
    Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    #33680

    I doesn’t want the background image to be loaded in the header of the shop, product-category, product-tag, product-attribute pages BUT want to keep the possibility to insert product categories via shortcode (because when I insert them via shortcode it will display a background picture and if there is none because previoulsy I deleted all then I can not do this). Hope this was not to complicated explained, if so please just look at the first part. “I doesn’t want the background image to be loaded in the header of the shop, product-category, product-tag, product-attribute pages”. Thanks!

    #33685

    Hi Florian,

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

    /* move category description below products */
    add_action( 'wp_head', 'remove_my_action' ); 
    function remove_my_action(){
        remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 );
    }
    
    function jas_claue_child_wc_page_head() {
    	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' );		
    	if ( is_search() ) {
    		$output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>';
    	} elseif ( is_product_category() ) {
    		// Remove old position of category description
    		remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
    		$output = '<div class="page-head pr tc"><div class="jas-container pr">';
    		$output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>';
    		$output .= do_shortcode( category_description() );
    		$output .= '</div></div>';			
    	} else {
    		$output .= '';
    	}
    	ob_start();
    	$output .= ob_get_clean();
    	
    
    	echo wp_kses_post( $output );
    }
    add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );

    Kind regards

    Harry
    Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    #33695

    Hi Harry,

     

    I have the code already in my functions.php (https://www.fashionchingu.com/adeelmustafa/wp-admin/options-general.php?page=my-custom-functions)  and it does what it should “Change Category Text Position”, but this is not the thing I want in this thread. I am not sure what is unclear, please tell me.

    Best,

    Florian

    #33707

    Hi,

    You code different with my code. Please change your code on line 65 – 95 to

    //Change position of category text
    
    function remove_shop_heading() {
        remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 );
    }
    add_action('wp_head', 'remove_shop_heading');
    
    function jas_claue_child_wc_page_head() {
    	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' );		
    	if ( is_search() ) {
    		$output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>';
    	} elseif ( is_product_category() ) {
    		// Remove old position of category description
    		remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
    		$output = '<div class="page-head pr tc"><div class="jas-container pr">';
    		$output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>';
    		$output .= do_shortcode( category_description() );
    		$output .= '</div></div>';			
    	} else {
    		$output .= '';
    	}
    	ob_start();
    	$output .= ob_get_clean();
    	
    
    	echo wp_kses_post( $output );
    }
    add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );

    Kind regards

    Harry
    Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    #33714

    Hi Harry,

    applied the code – thank you for this.

    It’s not so perfect yet.

    1. The background picture is just gone on shop, and not on product-category,product-tag & product attribute. Despite that, on the shop picture there is also no title but the title (H1) is pretty essential.
    2. On product-categories the background picture is still loaded.
    3. When I have text now on the product category it looks like this https://www.fashionchingu.com/adeelmustafa/kpop-fashion/bts-clothes/

    I hope you have one more idea. Thank you so much.

    #33716

    Normally category text is below the products. We did this previously together in this thread: http://support.janstudio.net/forums/topic/product-category-text-should-be-displayed-above-products/

    #33723

    Hi,

    I think you want keep on product category. Please change code to

    //Change position of category text
    
    function remove_shop_heading() {
        remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 );
    }
    add_action('wp_head', 'remove_shop_heading');
    
    function jas_claue_child_wc_page_head() {
    	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' );		
    	if ( is_search() ) {
    		$output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>';
    	} else {
    		// Remove old position of category description
    		remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
    		$output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>';
    		add_action( 'woocommerce_after_shop_loop', 'woocommerce_taxonomy_archive_description', 10 );		
    	}
    	ob_start();
    	$output .= ob_get_clean();
    	echo wp_kses_post( $output );
    }
    add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );

    Harry
    Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    #33757

    Great, that did it. Now only the Heading is completly white. Does it have a reason why you put class=”Cw” into the H1?

    Thank you so much!

    #33759

    You can remove this class because we use class for our theme style with dark background.

    Kind regards

    Harry
    Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    #33813

    Okay great I replaced it, everything fine.

    Sorry for bothering one more time, but is it possible to trigger this function only on mobile devices?

    Thank you & greetings,
    Florian

Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in to reply to this topic.