Home Forums WoodMart support forum Place to add the code

Place to add the code

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

    kontakt-7416
    Participant

    I have a short question.

    What is the best way to put php code in your theme (in this case, I mean woocommerce hooks).

    I have a child theme. Is it best to add them in the functions.php file or extract specific files from the main theme and load them into the child theme and add the code there?

    Code example:

    add_action(‘woocommerce_after_shop_loop_item’, ‘function_name’,5 );

    function function_name(){
    echo do_shortcode(“[shortcode name]”);
    }

    #439417

    Hello,

    You need to add code to the functions.php of the child theme.

    If you want a Woocommerce customization, copy the initial file, paste it into the child theme in the same route and edit.

    CSS is inserted in the Theme Settings > Custom CSS,
    JS is inserted in the Theme Settings > Custom JS.

    If you have any questions please feel free to contact us.

    Best Regards

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