php page not found for plugin options menu

Looking at an old commit on a plugin I am writing, I am seeing a couple of things that jump out at me. First is your options page declaration. I had mine as follows, using your labels: function settings_menu_email() { add_menu_page( ‘Set Email’, ‘Set Email’, ‘manage_options’, ’email_admin_menu’, ’email_admin_menu_callback’, ); add_submenu_page( ’email_admin_menu’, __( ‘Options’, ‘textdomain’ ), … Read more

How to inform the user that the save was not successful?

Handling admin notice on Edit Post When action related to post or editpost, we will be faced with redirect_post function. There are two filters you can use to handle the post messages, redirect_post_location and post_updated_messages ( see the list messages at https://core.trac.wordpress.org/browser/tags/4.8/src/wp-admin/edit-form-advanced.php#L135 ). Here the sample code how to handle the messages. Create new message … Read more

What would I need to write into a custom plugin in order to add a switch for a custom string of CSS to the edit page?

This code should do the trick. Put this in your functions.php file. function add_custom_css_meta_box() { add_meta_box( ‘custom-css’, ‘Custom CSS’, ‘post_meta_checkbox’, ‘page’, ‘side’ ); } add_action(‘add_meta_boxes’, ‘add_custom_css_meta_box’); function post_meta_checkbox($post) { $checkbox = get_post_meta($post->ID, ‘custom-css’, true); $checked = false; if($checkbox == ‘true’) { $checked = true; } ?> <p> <label>Tick this for custom CSS</label><br /> <input type=”checkbox” … Read more