Why does javascript works only if logged in?
Try: wp_enqueue_script( ‘nevermind-navigation’, get_template_directory_uri() . ‘/js/navigation.js’, array(‘jquery’) ); It is possible that jQuery is not enqueued, and you are not declaring it as a dependency for your script. Being logged in, automatically enqueues jQuery. EDIT: Console log says jQuery is not defined. Did you add a jQuery(document).ready($) function for the fixed-menu.js functions?