Modify Single Product Content? - by Unsder

This topic has 2 replies, 2 voices, and was last updated 7 years, 1 months ago ago by Olga Barlow

  • Avatar: Unsder
    Unsder
    Participant
    March 19, 2017 at 22:21

    My need is pretty simple and straightforward! On a single product page, I’d like to move the price from it’s current position below the short description, to a new position above the short description. I’ve tried adding and removing hooks in my functions.php file, but nothing I do changes the page layout. (Reference: https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/)

    Any suggestions?

    1 Answer
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 22, 2017 at 17:10

    Hello,

    Add the following code in child theme functions.php

    add_action('wp', 'new_position', 65);
    function new_position(){
    	add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
    	remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 25 );
    }

    Regards

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.