use javascript when certain category is selected
-
im trying to get code to work on pages with a praticular category selected im using javascript inbetween the php but i cant get the code to work for the life of me this is what i have tried so far
<?php
$category = get_the_category();
if (in_category(‘action’)) { ?>script code
<?php } ?>
- The topic ‘use javascript when certain category is selected’ is closed to new replies.