How to remove “admin.php?page=” from wp-admin using .htaccess?

You can try this (sorry, not previously tested). See comments inline for explanation: RewriteEngine On ## if any string separated by | is matched, it will append to ?page= RewriteRule ^(members|add-members|delete)$ admin.php?page=%1 [L,E=CLEAN_CONTACT_URL:1,QSA] ## If querystring starts with page= and is followed by any string separated by | ## put that in the first group. … Read more

WordPress admin notice in plugin function

Your problem is pretty simple. Your callback for this hook is not a simple function but some method of a class. If you add action like this: add_action(‘admin_notices’, ‘simple_notice’); you tell WP that there is some simple function called simple_notice and it should be called when hook admin_notices is processed. But… There is no such … Read more

AJAX handler throws 400 (Bad request) – why?

in your html add `<input name=”action” type=”hidden” value=”test_function”/>` here “value” is your “action_name”. Your ajax call is incorect. Data should be url: “your php action script” data: $(html data).serialize(), About ajax first try to create ajax on your computer without wordpress. When you understand how ajax work try on WordPress.

Bulk Delete Users Error uri too large

I would shy away from trying to do this is SQL. It is possible but probably not necessary and is more prone to error that using WordPress Core functions. You could use get_users() or WP_User_Query to retrieve your users but given that you only want to keep two users and you only need the ID … Read more

Cancel post save

I’d hooked to ‘wp_insert_post_empty_content’ filter. See https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-includes/post.php#L2748 //hook at the very end of all filters to prevent other filters from overwriting your return value ( 99 should be high enaugh ) add_filter( ‘wp_insert_post_empty_content’, ‘my_cancel_post_save_function’, 99, 2 ); function my_cancel_post_save_function( $maybe_empty, $postarr ) { if ( true === wp_is_post_revision( $postarr[ ‘ID’ ] ) ) { //postarr … Read more

Custom post type Admin Page

1. The easiest way is to use the plugin “Admin Columns”, to show the picture in columns https://wordpress.org/plugins/codepress-admin-columns/ 2. You also can code your own admin page with the function add_submenu_page(). http://codex.wordpress.org/Function_Reference/add_submenu_page You can create a query, loop through the posts and show the pictures.