I am trying to apply specific functions to a certain page ID in Woocommerce. However, it does not seem to apply. I have looked at both Wordpress and Woommerce conditional tags (http://ift.tt/2eSLc2t).
The simple code I am testing is shown below, but even that is not working.
if ( is_product()) {
echo ' HALLO sdfdsfsdfsdfsdf ';
}
I have also tried with page_id and post_id but cannot get this to work. I have added this code to my functions.php in my child theme.
Does anybody know to to write a specific function only for a specific product page (I know the value).
Aucun commentaire:
Enregistrer un commentaire