Display WP Start bar on front page only

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); } } );

Trouble preventing duplicate posts between 2 loops on homepage

As usual with multiple loops, one of which is main loop, the issue is messy. What it looks like is happening: Secondary loop runs and deals with some posts. Main loop runs and deals with some posts. What is actually happening: WordPress core is loaded. Posts are queried for main loop. Template file is decided … Read more