Dynamic WordPress Admin Panel

WordPress admin pages are typically created using add_menu_page() function that takes care of menu entry and calls custom function (provided by you) to generate content of the page. Obviously content of the page is arbitrary and should be easy to modify conditionally, using current_user_can() or other necessary checks.

html id is removed for non admin user?

simplest solution – set the post_author to an admin or editor user. The reason “id” and other attributes and tags are stripped from the content is to prevent unauthorized users to inject content which might be used to “still” the credentials of other users. Right now you don’t explicitly set the user to which the … Read more

how to remove +new from wp admin area

I think what you are asking is changing the text +NEW to ADD Deal. This code is adjusted like that. add_action( ‘admin_bar_menu’, ‘change_new_post_name’, 999 ); function change_new_post_name ( $wp_admin_bar ) { //Removing +New $wp_admin_bar->remove_node( ‘new-content’ ); //hyperlink for the new link. This can be anything. Currently it’s default. $link = get_bloginfo(‘url’).’/wp-admin/post-new.php’; //Parameters to create a … Read more

Equivalent of admin.php for public pages

Even if admin-ajax.php and Ajax API were created to be used in ajax requests, they can be used in normal http requests with no issues, just be aware that is_admin() will be true even if user is not logged and the request is done from frontend. What you have to do is create a callback … Read more