Custom Theme Want To Remove One Category From All Displays

The only solution I could imagine is removing, rewriting, replacing the meta box. // First remove the original one function wpse21483_remove_catbox() { remove_meta_box( ‘post_categories_meta_box’, ‘post’, ‘side’ ); } add_action( ‘admin_menu’, ‘wpse21483_remove_catbox’ ); // not sure about the hook function wpse21483_new_catbox() { // re-define – take a look at /wp-admin/include/metaboxes.php } // Hook the new one … Read more

How could I execute my plugin just in frontend (not in backend)

Check the requested URI: if(!is_admin() && strpos($_SERVER[‘REQUEST_URI’], ‘wp-login.php’) === false && strpos($_SERVER[‘REQUEST_URI’], ‘wp-signup.php’) === false) { … } But it’s probably better to use a white-list style: if(is_front_page() || is_singular() || is_archive()) { … } These 3 tags should cover pretty much all of the front-end…

Change the Default Pages Menu View in wp-admin

[Update] Answer rewritten, based on this other Q&A. To achieve this: Use this code: add_filter( ‘custom_menu_order’, ‘wpse_48933_submenu_order’ ); function wpse_48933_submenu_order( $menu_ord ) { global $submenu; // Enable the next line to inspect the $submenu values // echo ‘<pre>’.print_r($submenu,true).'</pre>’; $arr = array(); $arr[] = $submenu[‘edit.php?post_type=page’][10]; $arr[] = $submenu[‘edit.php?post_type=page’][5]; $submenu[‘edit.php?post_type=page’] = $arr; return $menu_ord; }

Edits to plugin not taking effect

Easiest way to test for caching – make a plugin-breaking change (remove a ; or something), upload it, and see what happens. If your admin panel whitescreens, congratulations – you don’t have caching. If it doesn’t, chances are your server is caching all php content with something APC. Contact them and ask about caching.

Sub folder CSS that’s read by Admin panel

Answered by @Vino here: https://stackoverflow.com/questions/12066316/sub-folder-css-template-headers-that-are-read-by-admin-panel/12139043#comment16259096_12139043 “File wp-includes/class-wp-theme.php, line 191, WP 3.4.1 source. but… there are no filters, and the class is final. You can edit at your peril, ’cause updates to WP will overwrite your efforts.”

How To Create User Specific Admin User Pages?

You can add a new page using add_(sub)menu_page();. WordPress is pretty kind in this case and offers tons of hooks, filters and higher level API functions that help you going around this. Let’s just use add_users_page(); and hook into admin_menu. Example plugin It adds an admin page that has the user_login as slug. Simply drop … Read more

How to redirect to action on custom page within admin section

Get the url of a specific admin page (e.g. the settings page (options-general.php)): admin_url( ‘options-general.php’ ) Codex admin_url() Adding query arguments to an url: $params = array( ‘page’ => $_REQUEST[‘page’], ‘action’ => ‘edit’, ‘rls_element’ => $item[‘rls_name’] ); $url = add_query_arg( $params, $org_url ); Codex add_query_arg() Put a and b together: $params = array( ‘page’ => … Read more