Adding CSS to custom post type admin page causes error

You need to check for the presence of ‘post_type’ as an index of $_GET before using it: if ((isset($_GET[‘post_type’]) && $_GET[‘post_type’] == ‘slide’) || (isset($post_type) && $post_type == ‘slide’)) : Also, you should be using the wp_enqueue_style function instead of echoing your stylesheet at ‘admin_head’: wp_enqueue_style( ‘meteor-slides-admin’, plugins_url(‘/css/meteor-slides-admin.css’, __FILE__), array(), ‘1.0’ ); More information on … Read more

Plugin – Make sure jquery is loaded in my settings page plus my JS file

First use add_options_page() – shorter wrapper, better practice. Second you need to save its return in some (global or static) variable. That is often used thingie and confusingly referenced by different names in documentation. Global $hook_suffix holds such value for current page. function create_admin_pages() { global $my_page; $my_page = add_options_page(… From there it is something … Read more

How to create a child/addon plugin

Personally I’d either write my own plugin with a if plugin x exists clause or just edit it and send the code off to the developer saying “I have added a feature to your plugin, hope you like it” kinda deal. Realistically though, in my own site I just edit the code and be done … Read more