I want to disable the default front page as I want to show always the first listed page in the frontend. Therefor I disable the Static Front Page.

But I have also to set in wp_options the variables show_on_front and page_on_front to remove the old default Front Page.

I can manipulate the variables in the DB:

UPDATE wp_options SET option_value = 'page' WHERE option_name = 'show_on_front';    
UPDATE wp_options SET option_value = '0' WHERE option_name = 'page_on_front';

How can I set this variables fix in my functions.php? Or is that the wrong approach?

1 Answer 1


You can use following:

update_option( 'show_on_front', 'page' );
update_option( 'page_on_front', '0' );

I hope this helps.

  • Thx, that's what I was looking for!
    – wittich
    Commented Mar 18, 2016 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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