How to remove items from +New admin menu?

To hide everything (menu and submenu)- function wpse_260669_remove_new_content(){ global $wp_admin_bar; $wp_admin_bar->remove_menu( ‘new-content’ ); } add_action( ‘wp_before_admin_bar_render’, ‘wpse_260669_remove_new_content’ ); To hide specific menu/submenu item(s)- function wpse_260669_remove_new_content_items(){ global $wp_admin_bar; $wp_admin_bar->remove_menu( ‘new-post’ ); // hides post CPT $wp_admin_bar->remove_menu( ‘new-product’ ); // hides product CPT $wp_admin_bar->remove_menu( ‘new-page’ ); // hides page CPT $wp_admin_bar->remove_menu( ‘new-media’ ); // hides media } … Read more

What’s the purpose of admin canonical tag?

What is frontend & what is backend in WordPress? The PHP CODE, SQL Queries etc. that are executed on your server is the backend & any HTML/CSS/JavaScript CODE that comes to the browser as a result, is the frontend. So even though, some parts of your site’s “frontend” may be restricted by a password protected … Read more

Can I rename the wp-admin folder?

Unfortunately it’s not currently possible nor does there appear to be will to consider it as a modification as you can see by this recent thread on the wp-hackers list and this ticket on trac. If you’d really like to see this be revisited I’d suggest: Present your case on wp-hackers but be forewarned your … Read more

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