If you need to make sure that your custom post type doesn’t have the ‘visual’ tab, you can easily diable it. Suppose you have a custom post type named ‘movie’:
add_filter( 'user_can_richedit', 'disable_for_cpt' );
function disable_for_cpt( $default ) {
global $post;
if ( 'movie' == get_post_type( $post ) )
return false;
return $default;
}
We often add custom meta boxes to a page or post in order to save specific kinds of data. In some cases, the best place to add those fields really isn’t in some box that gets added to the end of the page. The option needs to be in a bit more prominent location.
Fortunately, it’s possible to add text or form elements to the “Publish” meta box.
What I needed at one time was a way to mark a post that would determine whether it would be displayed in a regular article style, or in a special box style. Nowadays, I can use post formats. But the point is, you could put other options there. Perhaps an expiration date field.
If you need to auto-append information to the end of your page/post content, there’s an easier way to do it than editing your theme.
add_filter( 'the_content', 'append_to_content' );
function append_to_content($content) {
global $post;
//if you want to restrict this to a specific post type
if (get_post_type($post) == 'post') {
$content .= '<p style="text-align:center;">***</p>';
}
return $content;
}
Can be especially useful for auto-appending custom field information