Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #174901

    thecashbag
    Participant

    If I wanted to add some text and images to my product page on WooCommerce, just under the comment and sale number box on the right hand side of the product images (see here: http://prntscr.com/5nib1g). Which files should I bring over to my child theme so I can edit them and include the text and images?

    I have looked inside the theme but can’t find the area within the code I should insert my code.

    Product page: https://petpresto.com.au/product/toughbag-dog-bean-bag-bed/

    NOTE: I am wanting to add something simple like small icons and text saying “Free Returns”, “Free Shipping”, etc.

    #174931

    Paul R
    Moderator

    Hi,

    Thanks for writing in!

    You can refer to this link in modifying single product page.

    https://theme.co/x/member/forums/topic/how-to-modify-woocommerce-base-page-listing-page-and-single-product-page/#post-165091

    Hope that helps.

    #174960

    thecashbag
    Participant

    I have looked under /x/woocommerce/single-product/ but cannot find the single-product file to edit.

    Can you please advise which file I should be looking at to include something in this area? http://prntscr.com/5nib1g

    #174992

    Zeshan
    Member

    Hi there,

    This is the default file in WooCommerce plugin folder wp-content/plugins/woocommerce/templates/content-single-product.php, however you can add something here by using WooCommerce built in ‘woocommerce_after_single_product_summary’ hook.

    While the support for 3rd party plugins is outside the scope of support, I could point you in the right direction with the understanding that it would ultimately be your responsibility to take it from here. So, you can use following code in your child theme’s functions.php file:

    function before_product_summary() {
       echo "your code/text here";
    }
    
    add_action('woocommerce_after_single_product_summary', 'before_product_summary');
    

    Replace your code/text here with your own text or HTML code.

    Thanks!