Hi there, I’m hoping you can help me figure out how to allow guest posts on my blog but require that they be approved by me before going up. Is this possible? Thanks FB
via FloppedBets
Hi there, I’m hoping you can help me figure out how to allow guest posts on my blog but require that they be approved by me before going up. Is this possible? Thanks FB
via FloppedBets
If you’re a WordPress developer and you would like others to have some benefit of your code it’s highly recommended that you follow the WordPress coding standards. As it can be a little rough to get used to it in the beginning my colleague Eoin posted some tricks that can help you applying these rules in Coda and TextWrangler.
Tidy and format your PHP and meet WordPress standards on Coda and TextWrangler.
When working with custom post types you might want to include them in particular result sets such as tag pages or category pages.
All you need to do in order to achieve this is hooking a little function in the parse_query action.
function query_my_post_types( &$query ) {
// Do this for all category and tag pages, can be extended to is_search() or is_home() ...
if ( is_category() || is_tag() ) {
$post_type = $query->get( 'post_type' );
// ... if no post_type was defined in query then set the defaults ...
if ( empty( $post_type ) ) {
$query->set( 'post_type', array(
'post',
'custom-post-type1', // your custom post type
'custom-post-type2', // an other custom post type
) );
}
}
}
add_action( 'parse_query', 'query_my_post_types' );
We love to help you. As we’re all passionate WordPress users we are happy to help you get your open WordPress related questions answered and problems solved.
Fill out the form below and we will publish it after a quick review or get back to you.
The Smashing Magazine has an awesome excerpt from Eric Meyer’s recent book Smashing CSS, published by Wiley in cooperation with Smashing Magazine. In this article, the focus is on what’s coming: css3 styling techniques you’ll use in the immediate and near-term future.
The Bright (Near) Future of CSS is a post from: Smashing Magazine