Say I have this added to my functions.php
function my_code() {?>
<script type="text/javascript">
random js scripss
</script>
<?php }
add_action('wp_footer','may_code');
How do I tell this to NOT appear for pages?
Say I have this added to my functions.php
function my_code() {?>
<script type="text/javascript">
random js scripss
</script>
<?php }
add_action('wp_footer','may_code');
How do I tell this to NOT appear for pages?
Hi,
this would be something like:
function my_code() {
if (!ispage()) {?>
<script type="text/javascript">
random js scripss
</script>
<?php
}
}
add_action('wp_footer','may_code');
More details 'bout conditional tags: http://codex.wordpress.org/Conditional_Tags
Chris
This topic has been closed to new replies.