Disable load scripts and styles not working

Try the following: function mytheme_deregister_scripts_and_styles(){ $unwanted_scripts = array( ‘photocrati_ajax’, ‘photocrati-nextgen_basic_thumbnails’, ‘photocrati-nextgen_basic_extended_album’ ); foreach ( $unwanted as $script ) { wp_dequeue_script( $script ); wp_deregister_script( $script ); } $unwanted_styles = array( ‘style_1’, ‘style_2’ ); foreach ( $unwanted_styles as $style ) { wp_dequeue_style( $style ); wp_deregister_style( $style ); } } add_action( ‘wp_enqueue_scripts’, ‘mytheme_deregister_scripts_and_styles’, 99 ); It looks like … Read more

WordPress menus – automatically generate

Use the WP database (via proper methods) to store a ‘is this the first run’ flag? Then just conditionally execute. check for flag in wp db if exist do nothing if not exist create me my menus dag nammit remember to set flag for next round so its only done once Something like that? If … Read more

Dequeue set-post-thumbnail.min.js

You should be able to dequeue like normal. Despite the complexity of the function, it is really just enqueueing scripts and styles. Tested with the admin bar script on the front end: add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_script(‘admin-bar’); } ); You just want admin_enqueue_scripts and set-post-thumbnail: add_action( ‘admin_enqueue_scripts’, function() { wp_dequeue_script(‘set-post-thumbnail’); } ); I am not … Read more

JQuery Login Dropdown not functioning in theme

its working now:- jQuery(function() { var $button = jQuery(‘#loginButton’); var $box = jQuery(‘#site-crhead’); var $form = jQuery(‘#loginForm’); $button.live(‘click’,function(login) { console.log($box); $box.toggle(); $button.toggleClass(‘active’); }); $form.live(‘click’,function() { return false; }); jQuery(this).live(‘click’,function(login) { if(!(jQuery(login.target).parent(‘#loginButton’).length > 0)) { $button.removeClass(‘active’); $box.hide(); } }); }); Just update your code according to you, even your mouseup function was not working, according to … Read more

Delete all blogs on multisite

I was able to get a work around in place. Since I was deleting all blogs with no user interaction. I created two mysql queries and ran them. The first was to drop all tables associated with the given $blog_id the second was to remove that row from the wp_blogs table. $blogs = wp_get_sites( array(‘limit’ … Read more