Jquery no more loading, load-scripts.php not found (404)

I had this problem with a multisite setup. On my secondary site load-scripts.php returned a 404 error. the following line in wp-config.php fixed it for me: define( ‘CONCATENATE_SCRIPTS’, false ); # worked for me my .htaccess file: # BEGIN manual WordPress Multisite # The directives (lines) between `BEGIN WordPress` and `END WordPress` are # dynamically … Read more

wp login redirects to homepage

Piggybacking on Denis’s comment about the site’s domain having changed…. if you can get access to the database (ie. if your host has phpmyadmin on its control panel) check the ‘siteurl’ option in the wp_options table of the database. If that option is set to an address that redirects or doesn’t resolve, you won’t be … Read more

How to disable 3.3 Tooltips?

You could also remove the pointer script and style from their respective arrays just after they have been registered using this method. // Remove javascript add_action( ‘wp_default_scripts’ , ‘remove_pointer_script’ ); function remove_pointer_script( $wp_scripts ) { $wp_scripts->remove(‘wp-pointer’); } // Remove stylesheet add_action( ‘wp_default_styles’ , ‘remove_pointer_style’ ); function remove_pointer_style( $wp_styles ) { $wp_styles->remove(‘wp-pointer’); } The remove method … Read more

wp-admin page is blank

Have you tried changing your function names? The main one that would concern me as potentially having overlap is name(). If I’m doing a theme for myself, usually I’ll use my_ as the prefix for everything, otherwise I’ll use a unique identifier based on the name of the theme.

Using tabs for wordpress plugin

If there is problem only with html markup you should check example from official jQuery UI site here: http://jqueryui.com/tabs/ It looks like yours, but for work you must check if your site include stuff like jquery and jquery ui script, jquery css is important too. After that you should have script with: $( “#tabs” ).tabs(); … Read more

Prevent from deleting any user role but subscriber

If you mean the delete button on the user list at /wp-admin/users.php, then that button is created by the WP_Users_List_Table class around (currently) line 256. If you look a little further down– a few lines– you will see a filter called user_row_actions. You can use that to hide the ‘delete’ link. add_filter( ‘user_row_actions’, function($actions, $user_object) … Read more

Add button in TinyMCE editor to insert text

Add this to your plugin file or in functions.php file in the theme directory add_action( ‘admin_enqueue_scripts’, ‘wpse_141344_admin_enqueue_scripts’ ); add_action( ‘admin_head’, ‘wpse_141344_add_mce_button’ ); function wpse_141344_admin_enqueue_scripts() { wp_enqueue_script( ‘wpse_141344-tinymce-scipt’, ‘url/to/your/custom-tinymce.js’ ); } function wpse_141344_add_mce_button() { if ( ! current_user_can( ‘edit_posts’ ) && ! current_user_can( ‘edit_pages’ ) ) { return; } add_filter( ‘mce_external_plugins’, ‘wpse_141344_add_tinymce_plugin’ ); add_filter( ‘mce_buttons’, ‘wpse_141344_register_mce_button’ … Read more

WP Admin default view mode for Custom Post Type

To change the mode URL variable but in the load try this: add_action( ‘load-edit.php’, ‘my_default_posts_list_mode’ ); function my_default_posts_list_mode() { $post_type = isset( $_GET[‘post_type’] ) ? $_GET[‘post_type’] : ”; if ( $post_type && $post_type == ‘my_post_type’ && !isset( $_REQUEST[‘mode’] ) ) $_REQUEST[‘mode’] = ‘excerpt’; } Got the “insipration” from here: Set Default Listing “View” in Admin