You need only use the default value on the wp_customize and that is all
$wp_customize->add_setting('mytextoption', array(
'default' => 'defaultvalue',
'capability' => 'edit_theme_options',
'type' => 'option',
replace defaultvalue for the value you want, and when the user activate the theme this line will register the default value on the DB only when not exist on the DB
Related Posts:
- Multisite: setting theme and options when a new blog is created
- Link to specific Customizer section
- When cropping a header image, retain meta data (i.e. name, description, etc.) from original image?
- Best practices for a Style/CSS based theme options page?
- How to refresh WordPress Customizer panel upon entering a value
- How do I create my own admin button and theme settings page?
- Looking for a way to load a function after customizer preview refresh complete
- Moving WordPress.com theme and widget settings to self-hosted site?
- Is it possible to stop a theme activation when a certain plugin is not activated
- Display custom_background outside wp_head()
- How do I change Twenty Nineteen’s primary color without using the color slider in the theme customizer?
- Copying theme from Localhost to Live does not copy all theme settings with it?
- Passing array in add_option()
- How to mark an option as selected
- Add transparency to wordpress color picker?
- How to change the themes “Live Preview” url within the Appearance->Themes page?
- Theme Customizer – How to create a sub panel
- Working with an Array inside Your Theme Options Array – Multiple Values
- Add a series of checkboxes to theme options
- What’s the order of loading wordpress elements?
- Create register form without a plugin
- How to conditionally display widgetized areas in theme customizer?
- loss of theme options while site deployment in production
- Create more than one section in Theme Customizer
- Theme settings default, strange behavior before first save
- How to find out if page_for_posts is showing (in order to style menu item)
- New custom theme option (text input) giving index error
- How do you approach block structured content?
- Own Theme Customizer displays error message when saving, saving still works
- Child Theme not overriding a template section on live site – but is on local site
- Full page (no WP admin menus and options) admin theme options
- Need help with making a website where user can add products
- How to dynamically change theme’s slogan from admin?
- How do I remove ‘Active Theme’ section from Customizer?
- Passing dynamic options from backend to frontend
- Problems to disable the comments for my statics pages
- Color Options from Theme Customizer API not returning via get_theme_mod()
- Interpretation and explanation of register sidebar
- WordPress setup one database with two different website?
- How to include stylesheet in custom admin using parent_slug
- Get data from Theme Options and use them into meta options field in custom post type
- What’s the easiest way of adding more options in the Theme Options of the twenty eleven theme?
- How to validate new added field (Phone number) which is added to registration form?
- wordpress-theme 2017: featured image behaviour: where to set the height of the featured image?
- WordPress customizer extremely slow, cant work in it
- Dynamic image for Jumbotron on WordPress Custom Theme
- How to implement theme option to change bootstrap 4 container from .container to .container-fluid
- Issues with dynamic widget in theme customizer
- Theme customizer hiding sections
- WP Customize API Checkbox change value
- WordPress Customazation API section in section
- Can i add wordpress editor to my custom theme option? [closed]
- Register a widget area when a theme option has been saved?
- Theme Options Menu Item – Permission Issue
- Page structure using The Customizer Api
- WordPress Theme redirects to the Index page – Theme customizer problem
- What’s the best way to go from a design to a customized WordPress site?
- Static front page displaying twice
- Changing appearance of WooCommerce product layout [closed]
- suspicious boolean.php file in wp web root [closed]
- What is the name of the theme/plugin used for WordPress Answers [closed]
- which theme is this? [closed]
- how to use Easy Docs theme to write a book?
- What theme does this website use? [closed]
- JQuery Error in theme for .live is not a function [closed]
- Where can I find the “add_action()” inside a theme?
- How to know which theme are we using in wordpress and change the content as well? [closed]
- Best way to include pagination in a theme [closed]
- How can I either move the nav bar down or create more space for the header? Theme – Ajaira
- Commenting in CSS (//) equals “none”? [closed]
- Theme Appearance [closed]
- Starting fresh on a blank “theme” [closed]
- What happens to bespoke page template references on theme change?
- To create a theme or use an existing one? [closed]
- Overwrite functions.php of a theme – What if the theme is updated?
- wordpress not able to open theme-editor.php
- How to add/edit content Custom Content item in theme
- Mystique theme: widgets on sidebar falling under the page content
- Church hope them issue
- Is there a WordPress theme for twittstrap? [closed]
- Stylesheet not being loaded? [closed]
- How to create an Single-Portfolio page?
- unsual theme / interface
- Adding a wp_head hook from an included PHP file
- Is it possible to find out what theme a specific web site is using? [closed]
- Basic clothing showroom [closed]
- How to insert a column (part of theme) in the middle of the content body?
- is it possible to create a website with wordpress with these requirements without coading?
- change template with button
- Rest API does not work after changing WordPress Theme
- How do I remove the dash (-) between my Site Title and Tagline?
- Theme making direct ajax calls to theme folder
- How to add sidebar to homepage programmatically?
- I want to increas my site image [closed]
- totally confused about editing wp theme….new guy to wp
- theme 2016 – customize css – nothing happens
- Can’t upload the theme
- How to remove header “ish” label [closed]
- Divi theme including javascript
- Add Text After Logo in zerif lite theme