Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Woocommerce single product move title above page and make fullwidth

Home / Forums / Virtue Theme / Woocommerce single product move title above page and make fullwidth

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
December 13, 2016 at 5:37 pm

Hi again !

I have made a few customizations on the single product page, using hooks so that it stays compatible with woocommerce or theme updates.
The goal is to display the title above both the page and the sidebar (like in fullwidth page template for instance).

I have put the following code in my functions.php

function change_product_page_order() {
if (is_product()) {
//var_dump($product);
/** Move Product Title above page */
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
add_action( 'woocommerce_before_main_content', 'woocommerce_template_single_title', 10 );
}
}
add_action('wp','change_product_page_order');

It shows the title and breadcrumbs (+ the horizontal line below) above the product image and the short description, but not fullwidth (the sidebar displays next to it)
See

I’ve tried changing the priority of the hook, like add_action( 'woocommerce_before_main_content', 'woocommerce_template_single_title', 5 ); but it breaks the title alignment, and does not solve the problem for the sidebar…

Can you give me any help with what I’m missing ?

Thanks in advance.

  • The forum ‘Virtue Theme’ is closed to new topics and replies.