Is it possible to use a single custom post as the site front page

You don’t want a post to be the front page, you want a custom post type entry to be the front page. Now that we have the terminology right, yes it’s possible.

A client once asked me to do the exact same thing. They had a custom post type they needed displayed on the front page. Doing so was as simple as adding a filter to allow them to select a “stack” (their custom post type) from the reading page:

function add_pages_to_dropdown( $pages, $r ){
    if ( ! isset( $r[ 'name' ] ) )
        return $pages;

    if ( 'page_on_front' == $r[ 'name' ] ) {
        $args = array(
            'post_type' => 'portfolio'
        );

        $portfolios = get_posts( $args );
        $pages = array_merge( $pages, $portfolios );
    }

    return $pages;
}
add_filter( 'get_pages', 'add_pages_to_dropdown', 10, 2 );

Then it’s just a matter of styling your templates to use the data correctly.

Leave a Comment