Remove the WordPress post date filter on custom post type admin pages

WordPress custom post types can be very useful for storing all sorts of different types of data in WordPress — and I should really write a post about that some time. But the date a post was published, i.e. its post_date, isn’t important for many custom post types. So why have a drop-down list of dates to filter your custom posts types by if you don’t need it? Continue reading Remove the WordPress post date filter on custom post type admin pages

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Remove all meta boxes from WordPress post edit form

When you create a custom post type in WordPress, you can ask register_post_type to¬†generate a default UI for managing your post type in the admin. When you edit your post type, WordPress generates the familiar post editor, just for your post type. You can change it through a variety of hooks, e.g. if you want to add some new meta boxes. But what if you don’t want any meta boxes, not even the standard ones? Continue reading Remove all meta boxes from WordPress post edit form

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

WordPress admin_init hook and the elusive typenow

In my quest to bring an object oriented separation of concerns to my WordPress plugins, I tend to separate the administration of each custom post type into its own class. I do this by looking at the global variable $typenow after the admin_init action is fired. But $typenow¬†isn’t always set after admin_init, so I have to improvise a little. Continue reading WordPress admin_init hook and the elusive typenow

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Custom post names for WordPress custom post types

When you edit a new post, page, or an object of a custom post type, WordPress generates a slug or post name that will be used in its permalink. It derives the post name from the title you gave it. Sometimes, however, you want the post name to have a little more information in it. Continue reading Custom post names for WordPress custom post types

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail