I was wondering if someone could help me display the plugin WP Start bar only on my static frontpage. If it helps my static frontpage url is: http://zackarylundquist.westhostsite.com/portfolio/


If you look at the plugin's source, its main bits are hooked as following:

add_action('wp_enqueue_scripts', 'init_wpstartbar_files');
add_action('admin_print_scripts', 'init_wpstartbar_admin');
add_action('wp_footer', 'wpstartbar_footer',1);

The easiest way to conditionally disable it would probably be along (not tested):

add_action( 'template_redirect', function() {

if( ! is_front_page() ) {
    remove_action('wp_enqueue_scripts', 'init_wpstartbar_files');
    remove_action('admin_print_scripts', 'init_wpstartbar_admin');
    remove_action('wp_footer', 'wpstartbar_footer',1);

} );
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.