admin_notices not working in post editor

So it looks like there is some page redirecting going on in the post updating process, hence why I can’t even access a $GLOBALS variable. The only alternative I found to use was to use a session variable. Something like: add_filter( ‘pre_insert_term’, ‘pre_insert_term_action’, 10, 2 ); add_action( ‘admin_notices’, ‘show_example_error’ ); function pre_insert_term_action( $term, $taxonomy ) … Read more

Settings page above CPT page in admin section

you can use the menu_order filter hook to change the order function custom_menu_order($menu_ord) { if (!$menu_ord) return true; return array(‘settings_page.php’, ‘edit.php?post_type=CTP1′,’edit.php?post_type=CTP2′,’edit.php?post_type=CTP3’); } add_filter(‘custom_menu_order’, ‘custom_menu_order’); add_filter(‘menu_order’, ‘custom_menu_order’);

Having admin on different host breaks attached images

you can configure the tinymce to use relative paths for images using the tiny_mce_before_init like this: function tinymce_relative_path( $init ) { $init[‘relative_urls’] = true; $init[‘document_base_url’] = ‘http://www.mysite.com’; return $init; } add_filter(‘tiny_mce_before_init’, ‘tinymce_relative_path’);

How can I activate Collapse Menu in WordPress?

You have to trigger the click event. Try, jQuery(document).ready(function() { jQuery(“#collapse-menu”).trigger(‘click’); }); Update: Use the following code to check if menu is already folded, if not trigger click event to fold it. jQuery(document).ready(function() { if ( !$(document.body).hasClass(‘folded’) ) { jQuery(“#collapse-menu”).trigger(‘click’); } });

How to show custom (checkbox) field value in admin post list?

i did something similar with some radio buttons and a special taxonomy. i worked almost exclusively from the following 2 tutorials: http://shibashake.com/wordpress-theme/expand-the-wordpress-quick-edit-menu http://scribu.net/wordpress/sortable-taxonomy-columns.html though i was working with a taxonomy, the scribu tutorial actually links to another scribu tutorial on sorting by meta, which is more in-line w/ the OP’s question: http://scribu.net/wordpress/custom-sortable-columns.html

How to sort categories by id in wordpress admin

The following should work… add_action(‘get_terms_args’,’my_order_cats’,10,2); function my_order_cats($args,$taxonomies){ //Check we are admin side if(is_admin()){ $taxonomy = $taxonomies[0]; $screen = get_current_screen(); //Check screen ID and taxonomy and changes $args where appropriate. if(($screen->id==’edit-category’||$screen->id==’post’) && $taxonomy==’category’){ $args[‘orderby’]=’id’; //preserves order of subcategories. $args[‘order’]=’asc’; //or desc } } return $args; } It preserves the order of subcategories (i.e. children always appear … Read more

Custom taxonomy admin page

Not sure why I didn’t think of this earlier. I suppose I was hoping for a way to ‘hijack’ the default page to display something else… Anyway following my original method: If you want a custom admin page for a taxonomy, you can set ‘show_ui’ => false when you register it to suppress the default … Read more