jquery not calling php function

For logged in users, use: wp_ajax_{$action} For logged out users, use: wp_ajax_nopriv_{$action} Your code is currently using wp_ajax_{$action} -> wp_ajax_nizam_handler which will restrict the request to logged in (authenticated users). If you are logged out at the time of the request, you will never make it into your callback. If you want to target logged … Read more

Most efficient way to use classes to create admin pages using Settings API

The example in Settings API documentation uses admin_init and admin_menu for registering custom settings and admin pages. https://developer.wordpress.org/plugins/settings/custom-settings-page/ There’s also an old Codex entry on actions typically run on front and back end requests, which can help pick a suitable action hook. https://codex.wordpress.org/Plugin_API/Action_Reference I also highly recommend the excellent old Q&A about instantiating classes in … Read more