• Resolved sorro445

    (@sorro445)


    If anyone could please help me with this: I need to either

    – move all Woocommerce messages to ABOVE the page title (most importantly on the single product page, but it would be great to have it on cart and checkout as well)

    or alternatively

    – move the breadcrumbs on the single product page BELOW the product title, so just between the product title and the price.

    Is there anyone who could help me with this?

    Thanks a lot,
    sorro

Viewing 6 replies - 1 through 6 (of 6 total)
  • hannah

    (@hannahritner)

    Hi Sorro,
    Which WooCommerce messages are you referencing? There isn’t a simple solution to move the breadcrumbs below the product title.
    Are you familiar with Elementor page builder (https://www.ads-software.com/plugins/elementor/)? I would suggest using it along with our Kadence WooCommerce Elementor plugin (https://www.ads-software.com/plugins/kadence-woocommerce-elementor/) That will allow you to fully customize your product pages.
    Let me know if that will work for you!

    Hannah

    Thread Starter sorro445

    (@sorro445)

    Hello Hannah! Thank you for your reply. The reason I am asking is the following: I always have the breadcrumbs on all regular pages below the page title. But on the single product page, when you choose “Show title in content” (and not in header), the breadcrumbs are of course still on the upper left, and I would like them to be always below the page title/product title.

    If I choose to have the product title to appear in the header instead of in the content(possible in the theme settings), I have the breadcrumbs where I want them, but the Woocommerce messages like “Product x was successfully added to your cart” or really any Woo message like when someone tries to put something into his cart that is not available any longer, all these messages appear then below the page title, and I need them above, just after the header…so that’s why I somehow need to either use the option of showing the product title in the content, and moving the breadcrumbs to underneath the product title, or showing the product title in header, and moving all the Woo notices.

    hannah

    (@hannahritner)

    Do you mind posting a link to your site?
    Thanks!

    Hannah

    Thread Starter sorro445

    (@sorro445)

    Hi Hannah,

    my site is only locally hosted, I can’t provide a link. I understand it’s a bit difficult to explain in words, but my one option is to use “show product title in content area”. Then, I would need to move the breadcrumbs(kt_nomargin) to underneath the product title, to be consistent with the breadcrumb positioning.

    If this not possible at all, I would need to choose the “show product title in head area” instead, so my breadcrumbs are where they are supposed to be. But the problem with this is that I have applied a max width to my product titles in order to force them into three rows, and all the Woocommece notice messages like “..was added to your cart” move very far down on the page since they are by default positioned UNDERNEATH the page title (which is now in three lines). So I need these to be ABOVE the page title, preferably also for cart and checkout page. I haave tried
    `add_action( ‘init’, ‘remove_single_product_print_notices’ );
    function remove_single_product_print_notices(){
    remove_action( ‘woocommerce_before_single_product’, ‘wc_print_notices’, 10 );
    }`

    to remove them and tried to add them to the page-title template, but it did not work.

    Hey,
    1.

    Then, I would need to move the breadcrumbs(kt_nomargin) to underneath the product title, to be consistent with the breadcrumb positioning.

    That isn’t an option within the theme. You would either need to override through a child theme or use our plugin to customize the product page: https://www.ads-software.com/plugins/kadence-woocommerce-elementor/

    2. You can use this in a child theme ( I tested it ) and it will remove the noticed from below the title and add above:

    
    add_action( 'init', 'custom_change_product_print_notices', 20 );
    function custom_change_product_print_notices() {
    	remove_action( 'woocommerce_before_single_product', 'wc_print_notices', 10 );
    	add_action( 'woocommerce_before_main_content', 'custom_print_notice_output', 1 );
    	function custom_print_notice_output() {
    		if ( is_product() ) {
    			echo '<div class="container kt-woo-messages-above-title">';
    				echo do_shortcode( '[woocommerce_messages]' );
    			echo '</div>';
    		}
    	}
    }

    The cart and checkout notices are hard-coded into the woocommerce cart and checkout templates. You would have to edit those directly if you want to move it.

    I hope that helps.

    Thread Starter sorro445

    (@sorro445)

    Thank you. I tried both options, and decided to use the plugin!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Breadcrumbs, woocommerce messages’ is closed to new replies.