Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am having a heck of a time trying to get this simple function to work in WP using ubermenu: My goal is to have dropdown menu-itm-156 fire when the document.ready and control it based on which page you are on.


$page = array( 42, 'page1', 'Page Title' );
$post = array( 1, 'post1', 'Post Title' );
if ( is_page($page) || is_single($post) ) {
<script type="text/javascript">
jQuery(function($) {

<?php  }  ?>

Any help would be a life saver,

Thank you

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.