Skip to main content
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
Source Link

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 Pagedisable 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?

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?

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?

Source Link
wittich
  • 173
  • 2
  • 10

How to set wp_options in functions.php for removeing the Default Front Page

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?