How would I target a specific Woocommerce template file in my Child Theme?
-
Hello Everyone,
I am currently trying to write a if-statement based on my current template. In QueryMonitor it shows that my current template is the Woocommerce plugin’s ‘templates/single-product’. The issue is when I call get_page_template() in my child themes functions.php it returns ‘page.php’ as my current page template.
My end goal is to write the following conditional for my product page.
`if ( single-product ) { // enqueue scripts }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How would I target a specific Woocommerce template file in my Child Theme?’ is closed to new replies.