php - Custom Post Types in main index? (wordpress) -


i'm using thematic framework along custom post type ui plug in make custom posts. far can access permalink page of custom posts, don't appear on main index of posts made. wondering if possible make custom post types appear part of main post feed , how done if possible.

this wordpress documentation

write in theme folders functions.php file:

function add_post_type_home_query( $query ) {     if ( $query->is_home() && $query->is_main_query() ) {         $query->set('post_type', array( 'post', 'your_custom_post_type' ) );     } } add_action( 'pre_get_posts', 'add_post_type_home_query' ); 

don't forget replace 'your_custom_post_type' actual post_type created.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -