Skip to content
Public Ticket #28739

Custom content in single product page

Conversation thread

PenciDesign Supporter replied

Staff Reply

Hi,

If you want to modify the content position, please change the number "30" to "50".

add_action( 'woocommerce_single_product_summary', function(){
    ?>
    add your content at this area
    <?php
}, 50 ); // change position at this line

Regards,
PenciDesign.


sourav replied

Customer Reply

Ok , but i need to move the position of the content , I want the content to appear just before the start of the the description.

I have attached an image below for better understand of the content position.

sourav replied

Customer Reply

How can i add the text for a specific product or category and also include links in it

PenciDesign Supporter replied

Staff Reply

Hi,

Please modify this content:

add_action( 'woocommerce_single_product_summary', function(){
    ?>
    add your content at this area
    <?php
}, 30 );

Regards,
PenciDesign.


sourav replied

Customer Reply

I did but its not showing anything 

PenciDesign Supporter replied

Staff Reply

Hi,

You should paste this code into the function.php of the child theme or via the CodeSnippet plugin here: https://wordpress.org/plugins/code-snippets/

add_action( 'woocommerce_single_product_summary', function(){
    ?>
    add your content at this area
    <?php
}, 45 );

Regards,
PenciDesign.



sourav replied

Customer Reply

Sorry , I forgot to attach the image in the previous message , i have attached it here

sourav started the conversation

Conversation Start

Hi , is it possible to add some custom data some text with a link on the single product page for a specific product or  category.

I have attached an image below that indicates the place where i would like to add the custom text.

I want to add it just before the product description area

Want to join this conversation or access attachments? Sign in first.