3

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

  • When you comment "add_action('init', NAMESPACE . '\\force_static_page');", does the fields appears again ? – Sladix Nov 10 '15 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. – TheDeadMedic Nov 10 '15 at 11:16
  • @AntoineGuillien I made that function to force it to have the correct option. – Andrew Welch Nov 10 '15 at 13:14
  • @TheDeadMedic I don't have a lot of 3rd party plugins - maybe 1 - will try it anyway – Andrew Welch Nov 10 '15 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. – TheDeadMedic Nov 10 '15 at 13:18
7

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

  • There is not Home under Appearance --> Menus --> Posts --> View All. How do I turn on my homepage to visible? – SparkAndShine Apr 3 '17 at 11:47
3

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!

protected by Community Jul 25 '18 at 12:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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