I need to determine whether the reading settings are set to use a static page or the latest post for the front page.

Is there a conditional that will return true if the front page is set to show a static page? I don’t need to check what page the static page might be, just if its a static page at all.

For this scenario would it be correct to use:

if( is_front_page() && !is_home() ){
   // seems we're on the front but not on the blog home,
   // so it must be a static page..
}

1
1

Your conditional logic makes sense as well but you’re probably looking for this:

if ( 'page' == get_option('show_on_front') ) {
   // do something
}

Hint: You can append options.php to the WordpPress admin url like this:
http://www.example.com/wp-admin/options.php to see all options.
( that’s where I found the answer for you .)

Leave a Reply

Your email address will not be published. Required fields are marked *