Home Forums Themes Support HelpDesk Clean URL for filter

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

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #28286

    Hello, i would like to ask about filter in category because I see in gecko theme that after i filter product i have clean URL like this https://demo-gecko-plus.myshopify.com/collections/all/color-blue

    and in template i bought claue i have like this http://janstudio.net/claue/demo/shop/?product_cat=jackets&source_id=125&source_tax=product_cat&filter_brand=zara&query_type_brand=or

    Can i fix it?

    Also i would like to add description for all category and I would like to be vissible above products but as a text not a grey frame with text and without tiitle page, how can i do that?

    #28289

    Hi,

    1. The link you sent is running on Shopify and you’re using WooCommerce it doesn’t support clean URL with filter

    2. Please add below code to functions.php in claue-child

    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' );
    
    	$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', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>';
    		} elseif ( is_shop() ) {
    			$output .= '<h1 class="mb__5 cw">' . esc_html( cs_get_option( 'wc-page-title' ) ) . '</h1>';
    			//$output .= '<p class="mg__0">' . do_shortcode( cs_get_option( 'wc-page-desc' ) ) . '</p>';
                
    		} else {
    			// Remove old position of category description
    			//do_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
    
    			$output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>';
    			//add_action( 'woocommerce_before_shop_loop', 'woocommerce_taxonomy_archive_description', 10 );
    		}
    		ob_start();
    		$output .= ob_get_clean();
    	$output .= '</div></div>';
    
    	echo wp_kses_post( $output );
    }
    add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );

    and download attach file and put in claue-child > woocommerce you need create new folder “woocommerce” in claue-child

    Kind regards

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

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

    #28294

    thank you very much for information but also i have one more problem, because today i want to strat editting pages

    but every page i add and also this exsisting one I have the same infomation on it 404
    SORRY! PAGE YOU ARE LOOKING CAN’T BE FOUND.
    Go back to the homepage

     

    Only homepage and shop store are working, can you help me with that?

    #28298

    About first question

    i follow your instruction i open /public_html/jaknosic.pl/wp-content/themes/claue

    i add all function but it isnt working https://jaknosic.pl/sklep/kobieta/

     

    #28300

    About first question

    i follow your instruction i open /public_html/jaknosic.pl/wp-content/themes/claue

    i add all function but it isnt working it is only change position of text above category but it is in grey frame with title https://jaknosic.pl/sklep/kobieta/

    I attached you a file how i want to be made

     

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

    Hi,

    I recommend add function to claue-child > functions.php. Don’t add to claue > functions.php because when you update this file will reset

    To make like your screenshot please remove file archive-product.php in claue-child > woocommerce and change prev code in functions.php to

    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' );
    
    	$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', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>';
    		} elseif ( is_shop() ) {
    			$output .= '<h1 class="mb__5 cw">' . esc_html( cs_get_option( 'wc-page-title' ) ) . '</h1>';
    			//$output .= '<p class="mg__0">' . do_shortcode( cs_get_option( 'wc-page-desc' ) ) . '</p>';
                
    		} else {
    			// Remove old position of category description
    			//do_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
    
    			$output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>';
    			add_action( 'woocommerce_before_shop_loop', 'woocommerce_taxonomy_archive_description', 10 );
    		}
    		ob_start();
    		$output .= ob_get_clean();
    	$output .= '</div></div>';
    
    	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

    #28311

    hello, but i dont have a folder called claue-child > functions.php.

    i send you a screen and i open the file /public_html/jaknosic.pl/wp-content/themes/claue

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

    ok, i install for wordress claue-chlid.zip and install and also add the code but nothing change  (attached screen) https://jaknosic.pl/sklep/kobieta/

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

    Hi,

    Please activate claue child in Appearance > Themes

    Kind regards.

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

    #28317

    i do this, and also i add the script which you send me but nothing change – in earlier message i send you a screen shot.

    and i also attached

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

    Hi,

    This issue cause by plugin Premmerce WooCommerce Product Filter conflict code http://prntscr.com/m8bm79

    I deactivate plugin, save code and re-activate plugin Premmerce WooCommerce Product Filter

    It now work well.

    Kind regards

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

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

You must be logged in to reply to this topic.