What type to upload image within theme options?

If using image radio buttons, define a directory path here is code. I hope its going work. $imagepath = get_template_directory_uri() . ‘/images/’; $options = array(); $options[] = array( “name” => __(‘Logo’, ‘prothemeus’), “desc” => __(‘Upload your logo’, ‘prothemeus’), “id” => “pt_logo”, “type” => “upload”);

illegal offset in option add

The array is ‘hidden’ inside the form elements. Their respective name/ID is like MY_option_name[some_other_name]. That is the array structure. // Edit (to elaborate a little on that) Suppose you have the following form: <form action=”options.php” method=”post”> Font:<br /> <input type=”text” name=”MY_options[font]” id=”MY_options[font]” /> Color:<br /> <input type=”text” name=”MY_options[color]” id=”MY_options[color]” /> <?php submit_button(); ?> </form> If … Read more

Fatal error: Call to undefined function get_option()

I don’t see any get_option() function on line 9 or anywhere else in your code. After quick googling, my guess would be that your problem is the same as this question on stackoverflow EDIT As @Ray proposed at the linked question, paste this in your code to check if wp-includes/option.php is included: $includedStuff = get_included_files(); … Read more

Where to adjust presets for slider options “auto rotate” (3, 5, 10, 15 seconds)? [closed]

In anybody needs this in the future I found a quick and easy workaround: you could just adjust the slider interval in the shortcode. First you have to switch to the “classic mode” (turn the Visual Composer off) and then find the shortcode that defines the interval: [vc_gallery interval=”10″ images=”22390,23006″ img_size=”full”] You can then set … Read more

Using get_option() for check box field

This may not exactly answer the question, but let’s see the issues with your code: If you want to save the data in the same format as the default value ($fields_default), then: Start your foreach like so: foreach ( $orderdescider as $i => $item ). Then inside that foreach, $id and $checkbox should always be … Read more

selecting options from another form

In the following line: $select_branch = $wpdb->get_results($wpdb->prepare(“SELECT * FROM $table_name”));, you are using $wpdb->prepareincorrectly. wpdb::prepare needs two arguments, first one is a Query string with sprintf like placeholders and second an array of the values to to substitute the placeholders. More details here. And that is the error you are getting as posted on top … Read more