WordPress theme options and insert default value for serialize data

Loop over your array of options and generate a set of defaults from that.. Let’s imagine your array looks something like this.. (but obviously bigger).. $your_options = array( array( ‘name’ => ‘option-one’, ‘desc’ => ‘Option one description’, ‘type’ => ‘text’, ‘std’ => ‘default_value’ ), ..and so on.. for each option.. ); First check if you … Read more

Fatal error with a theme

First thing i ran across was this conversation about the same issue. I couldn’t find it in the theme repo, but found it accessible via svn @repo. Now please answer some basic questions: Which version (wp & quality control) are you running? Could you share a link to your install? Which modifications have you made? … Read more

New custom theme option (text input) giving index error

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 … Read more

Custom branding / theme specified by URL

EDIT On second thought: no, both Themes couldn’t use the same database. If they did, they would have to have exactly the same settings, including active Theme, activated Plugins, and settings – which includes home_url(). There may be other ways to go about it, but this isn’t one. ORIGINAL ANSWER If I’m following your question … Read more