You can use following:
update_option( 'show_on_front', 'page' );
update_option( 'page_on_front', '0' );
I hope this helps.
Related Posts:
- How does WordPress decide what template to use as frontpage
- When to use is_home() vs is_front_page()?
- How to store widget fields data as an array?
- How To Add New Option Types To Option Tree?
- Modular theme settings
- get_option function
- How do I show sticky posts on a static front page that also contains content?
- Get category slug and display it on a query_post
- Override Current Theme Setting in wp_config.php
- Why might $input (Settings API) be coming through empty?
- Multiple Custom_Background, is it possible?
- Static Front Page problem
- two tinyMCE editors in the same page
- Set front page as static page [closed]
- Cannot update WordPress General Settings Site Title and Tagline
- How to upload images using Settings API
- Theme settings keep getting reset/erased
- Disable front-page.php template
- Set a static front-page as a landing page programmatically
- Where should I update_options in a theme?
- How can I display/hide certain content based on a Theme Option field?
- Displaying recent post excerpts on static front page
- How can I make my options in an array and store theme in WP options one DB row?
- How to Find the Page the Front Page is Using?
- How to Call pages from a Options Panel
- Efficiency of wp_options vs a new table
- Override plugin option by with a custom theme
- is_home and is_frontpage always true
- Theme Development -> Specific Homepage
- What is the need for the static front page [closed]
- not getting API setting saved confirmation message after update on option page
- What is the best way to build home pages with a lot of sections for distributable themes [closed]
- Confused by the behaviour of “front page” / “home” templates
- Update Specific Key Value in Complex `wp_options` object
- How to remove permalinks links presents in each page of my site?
- static front page ONLY for certain themes?
- Tabbed theme options query about add_settings_section callback function
- is_front_page use in sidebar.php
- 1 post per category on homepage and counting those posts
- Unable to delete option
- 3 x 3 grid of posts on the home page
- Theme Option’s Save Button is not working
- What is the advantage of using home.php over index.php for the front page
- Why is wp_head() creating a top margin at the top of my theme header?
- How to limit wordpress menu depth in admin panel
- How can I set image sizes and still have responsive images using the srcset attribute?
- Possible to “Attach” images to multiple posts without inserting or uploading twice?
- Remove settings if theme is deleted?
- Adding customizer styles with wp_add_inline_style
- Adding widgets programatically: how to avoid collisions?
- How do I get a parent theme modification from a child theme?
- Removing the default sidebar from admin panel
- Is there any need to use both wp_reset_postdata and wp_reset_query together?
- how to pull wordpress post comments to a external page
- Enqueued Stylesheets Effecting Admin Styles
- How i can get widgets areas working in customizer?
- Theme development question regarding layouts
- Using wp_tag_cloud(‘format=array’) to print tag names without links?
- Link to a .po file in a child theme
- My Admin bar covers my sticky navbar [closed]
- Responsive embed for the video shortcode
- Access theme options in templates
- How to show post from category select
- How to: JQuery multiple wordpress media uploader buttons in the same options page?
- Move default page templates to sub directory
- How to upload/update theme from local – bitbucket – shared hosting?
- Load sidebar template just once to prevent multiple animations
- WordPress linking
- wp.media issue with selected image
- Why does admin-ajax load slow and what are ways to speed it up?
- Shortcodes do not work in own template
- Adding Bootstrap to WordPress TwentySixteen Theme
- What are the allowable Tags values in a theme file header?
- Following/tracing page construction through theme PHP
- Get themes’s images path in WordPress Multisite
- altering search terms
- Creating a theme update notification api [duplicate]
- Custom menu: Link names
- Inconsistent bloginfo information
- How to custom category template based on category?
- get_the_terms() returning wrong results inside of loop
- Category-specific loop not working
- How to diagnose wp-env environment problem
- SIte logo is not displaying
- How to make menus, footer, sidebars multi language
- overlay post title over post’s featured image
- Hook in parent theme Menu function
- How to add custom nav_menu_css_class to certain menu only?
- How to avoid Ajax in wordpress theme in making mulitple request?
- Import from HubSpot COS into WordPress 4?
- Any disadvandages if I style the wordpress align classes without img and .wp-caption prefix
- Simple loop with shortcode rendering problem
- Theme automatically inserting “more” tag on every post
- Conditional tags issue for multiple is_page() conditions in sidebar.php
- Allowed memory size of (…) exhausted
- have_posts() return false on single post
- Twenty sixteen – full height
- Bootstrap 4 mobile menu not working for WordPress Development
- How do I send out an update for my custom wordpress theme?
- custom wordpress theme blog page always not showing the last two pages of the articles