Getting the Site URL Including the Front Base

You can get the value of front in the global $wp_rewrite:

global $wp_rewrite;
echo $wp_rewrite->front;
// or
echo home_url( $wp_rewrite->front );

Though that is probably of limited use, as the front base isn’t necessarily an existing page, and may 404 in many cases. If you’re using that value to prepend to other URLs, you’re likely doing it wrong.

If you want the page designated as the posts page, that value is stored in the page_for_posts option:

echo get_permalink( get_option( 'page_for_posts' ) );

Leave a Comment