• Resolved snapwebdesign

    (@snapwebdesign)


    Hi, is it possible to show the subtitle above the Woocommerce Product title? Preferably using code in the functions.php file.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author HelgaTheViking

    (@helgatheviking)

    You need to add the subtitle function to the appropriate hook with the appropriate hook. For single product pages, try

    add_action( 'woocommerce_single_product_summary', 'the_subtitle', 3 );

    Thread Starter snapwebdesign

    (@snapwebdesign)

    That solved my problem, thank you for the quick response. Below is the final code I used for anyone else searching for the problem.

    function kia_add_subtitle_to_woocommerce(){
    if( function_exists( ‘the_subtitle’ ) ) the_subtitle( ‘<h4 class=”subtitle”>’, ‘</h4>’ );
    }
    add_action( ‘woocommerce_single_product_summary’, ‘kia_add_subtitle_to_woocommerce’, 3 );

    Thanks

    Plugin Author HelgaTheViking

    (@helgatheviking)

    Yes, your code is probably better in case you ever deactivate KIA Subtitle, your theme won’t break.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Move Subtitle above woocommerce product title’ is closed to new replies.