Wrap the call in an isset()
conditional in this line:
<input id="cpt_theme_options[cpt_sm_dribbble_handle]" class="regular-text" type="text" name="cpt_theme_options[cpt_sm_dribbble_handle]" value="<?php esc_attr_e($options['cpt_sm_dribbble_handle']); ?>" />
Try something like this:
$cpt_sm_dribbble_handle = ( isset( $options['cpt_sm_dribbble_handle']) ? $options['cpt_sm_dribbble_handle']) : '' );
<input id="cpt_theme_options[cpt_sm_dribbble_handle]" class="regular-text" type="text" name="cpt_theme_options[cpt_sm_dribbble_handle]" value="<?php esc_attr_e($cpt_sm_dribbble_handle); ?>" />
EDIT
Note: your other alternative is to set default options on init, so that this option is set to some default value, e.g. an empty string.
Related Posts:
- Best practices for a Style/CSS based theme options page?
- How do I create my own admin button and theme settings page?
- Moving WordPress.com theme and widget settings to self-hosted site?
- Multisite: setting theme and options when a new blog is created
- Copying theme from Localhost to Live does not copy all theme settings with it?
- Register theme customizer settings when theme activates [duplicate]
- How to mark an option as selected
- Add transparency to wordpress color picker?
- 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?
- loss of theme options while site deployment in production
- Theme settings default, strange behavior before first save
- How to find out if page_for_posts is showing (in order to style menu item)
- Full page (no WP admin menus and options) admin theme options
- How to dynamically change theme’s slogan from admin?
- Passing dynamic options from backend to frontend
- Problems to disable the comments for my statics pages
- 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 implement theme option to change bootstrap 4 container from .container to .container-fluid
- Plugin option for input box validation
- Can i add wordpress editor to my custom theme option? [closed]
- Meta title W3C Validation Error with
- Theme Options Menu Item – Permission Issue
- Opinions and recommendations on the best barebones base theme [closed]
- Adding admin-ajax.php to the frontend. Good or bad idea?
- what the best way to include images from the template’s images folder?
- How to refresh WordPress Customizer panel upon entering a value
- Set Featured Image for Archive templates
- How do I add a new string to a .po or .pot file?
- Free/Open-Source Theme Frameworks as an Alternate to Thesis? [closed]
- can require “themefolder/includes/widgets.php” in “themefolder/functions.php” yet widgets.php doesn’t run
- How to attach region identifier to a pretty url?
- Remove action within a class in a parent theme from the child theme
- How to get themes from wordpress.com per SVN? [closed]
- Edit raw HTML of the landing page
- remove rel=next on home page but not others
- How do you create a custom WPTouch theme?
- Added a new template file to a theme – get Call to undefined function error
- Defining different theme for Blog posts page
- WordPress Theme for Video Showcase [closed]
- How to understand a specific bit of WordPress syntax
- How to unset comment_notes_before field in WordPress comment_form
- Widgets menu does not appear under “Appearance” in dashboard
- Calling widget via function in themes files (hard code)
- Child theme not working after Parent Theme Update
- How to loop over wp_get_themes() and create an array of themes name
- Combining wordpress themes
- how to use the slide show of Skylark in showcase?
- Get name of current page template in Gutenberg era
- Mobile issue – website isn’t properly detecting screen size [closed]
- Redux callback action
- Problem of running development copy of WordPress on WebMatrix?
- translation does not work for ‘Home’
- How to translate a string that contains a WordPress sitename
- Advantages of wordpress theme vs wordpress as a backend only [closed]
- Is that a malicious code?
- How can my user make their own Blog/Diary
- Where do I find (free) fully-internationalized themes? [closed]
- How do I manually revert back to my old theme?
- Modifying the markup in the Tag Cloud widget?
- How to trace and resolve a theme problem such as flickering links in WordPress? [closed]
- Child theme looks different from parent theme, and incorrectly displays parts
- Adding an extra sidebar to your theme
- Widgets not showing on sidebars
- linking to an svg through comments_popup_link
- Create Custom Attachment Template That is Processed from Plugin Folder?
- my blog crashes ie7?
- How would I got about calling a php file every time someone publishes a new post?
- Custom theme – pages in menu
- remove preloader in WordPress theme [closed]
- Flexslider in child theme
- How to edit the default comment title?
- Why my function.php file in theme delete automatically? [closed]
- How to reverse the pagination numbers of an archive?
- Theme translates the_author_posts_link. How can I remove their translation?
- Theme CSS missing completely
- How to implement this layout?
- WordPress customizer extremely slow, cant work in it
- Missing privacy policy checkbox on login page (using Enfold theme)
- Themes don’t show up in the dashboard -> Appearance -> Themes
- Let custom text widget use the same font as the theme
- SSL errors when I activate my custom theme
- How to show taxonomy in WordPress shortcode
- Route to custom file
- “Template is missing” install error on non-child theme
- wordpress template page Usage [duplicate]
- No “available widgets” (wordpress 3.2.1 multisite)
- How to create a second index.php?
- Lightword Theme – only one menu item
- how to use Easy Docs theme to write a book?
- 2 WP websites same content different themes
- How is WordPress child related to Buddypress child theme
- What type to upload image within theme options?
- Define a Custom Template Part As A Widget Area
- Changing Sidebar In 2023 Theme
- Table of Contents in Left Navbar [closed]