if is_home() on head
-
Hello,
first sory for my english.
In <head> i put a code to simulate a click on the menu button after 4 seconds. It works well on all pages:<script> setTimeout(function() { $('#boutonmenu').trigger('click'); }, 4e3); </script>
But i want it only if we are on homepage, so i put the condition “if is home” but now it doesn’t work :
<?php if ( is_home()) { ?> <script> setTimeout(function() { $('#boutonmenu').trigger('click'); }, 4e3); </script> <?php } else { //... } ?>
Thanks for your help !!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘if is_home() on head’ is closed to new replies.