WooCommerce use Secondary PHP File (Recalling Template)

前端 未结 1 1240
既然无缘
既然无缘 2021-01-25 10:11

How am I supposed to call a secondary PHP file? Here is my code.

add_filter( \'woocommerce_product_tabs\', \'woo_simfree_product_tab\' );

function woo_simfree_p         


        
1条回答
  •  鱼传尺愫
    2021-01-25 10:23

    You'll need to use get_stylesheet_directory() to include your file, if it's a child theme do something like this:

    require get_stylesheet_directory() . "/custom-groups/grouped-simfree.php";
    

    The file should be at wp-content/themes/your-child-theme/custom-groups/grouped-simfree.php

    0 讨论(0)
提交回复
热议问题