Home Forums WoodMart support forum How to print text from functions.php in your theme

How to print text from functions.php in your theme

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #590640

    hola-3548
    Participant

    Hi team, I want to print a specific text when a product has no price… but the code I always use doesn’t work for me because in your template the product template is made with elementor.

    How can I print this text in your theme, in the child theme’s functions.php class?

    /* Put a contact button for products without a price */
    add_action( ‘woocommerce_single_product_summary’, ‘boton_sub_producto_single’, 5 );

    function boton_sub_producto_single() {
    echo “<br>…producto…”;
    }

    Thanks!

    #590856

    Luke Nielsen
    Keymaster

    Hello,

    Navigate to Dashboard -> Layouts -> Single product -> edit your product template and define the “WooCommerce Hook” element with the hook for which you define your custom.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)