Support » Fixing WordPress » post and custom post type listing

  • i have included custom post types to display on my home page loop using function

    function my_get_posts( $query ) {
    if ( is_page( 'not-here' ) )
         return $query;
    if ( ( is_home() && $query->is_main_query() ) || is_feed() )
    $query->set( 'post_type', array( 'post', 'videos', books', 'movies' ) );
    return $query;

    Now i can display my custom posts types by for books
    mysite/videos for videos
    mysite/movies for movies

    But i still don t know how to display only posts loop? give 404 error.

    any helping hand how to do that?

  • The topic ‘post and custom post type listing’ is closed to new replies.