8

Happily coding along all of a sudden I realise my homepage is now showing blog posts and the setting to set a static home page is missing from the reading option (see screen shot).

In the database the option show_on_front was now magically set to posts as well.

Some people have said that it is because there are no pages or no public pages. However, I have pages which are also public.

I have done the following for the moment

function force_static_page(){
    update_option( 'show_on_front', 'page', true);
    update_option( 'page_on_front', 28, true);
}
add_action('init', __NAMESPACE__ . '\\force_static_page');

enter image description here

5
  • When you comment "add_action('init', NAMESPACE . '\\force_static_page');", does the fields appears again ?
    – Sladix
    Nov 10, 2015 at 11:14
  • Rule out a rogue plugin by disabling all of them & re-activate one by one and check the reading settings each time. Nov 10, 2015 at 11:16
  • @AntoineGuillien I made that function to force it to have the correct option. Nov 10, 2015 at 13:14
  • @TheDeadMedic I don't have a lot of 3rd party plugins - maybe 1 - will try it anyway Nov 10, 2015 at 13:15
  • So long as you have pages, that setting should not be hidden - something must be causing trouble. It might be your theme. Try switching to twentyfifteen to debug. Nov 10, 2015 at 13:18

4 Answers 4

14

I just had the same problem but fixed it quickly! :-)

In my case, my homepage was on draft. Apparently, the settings then can't find the homepage anymore. It thinks it's gone and disables the option to set a default homepage.

So turn on your homepage to visible. (also name it "Home") Hope it works for you!

Cheers, Koen

1
  • 1
    There is not Home under Appearance --> Menus --> Posts --> View All. How do I turn on my homepage to visible? Apr 3, 2017 at 11:47
7

For me it was a simple fix - have at least 1 page published.

For any theme developers out there, something to note is that the 'static_blog_page' section in the customizer will also disappear if users don't have at least 1 page published.

1

I an also confirm that this happens if a page is published, but set to private. I thought that doing a batch edit to make all pages private would give me a way to develop without the public seeing the pages. That's still possible, but for those settings to re-appear, one has to have at least 1 published page that is public.

0

A little late to the party I know, but I just had this error, I had a public, published page, but could set it as a static page. Turns out it was because I changed my timezone and this upset the page published date somehow (even though it was well in the past). I just reset the publish date and I was on my way! good luck!

Not the answer you're looking for? Browse other questions tagged or ask your own question.