Widget options – where to put them?

I have answered this myself by adding an options page and adding options to the database. The functions are add_option(‘yourpluginoption1′,’value’); add_option(‘yourpluginoption2′,’value’); add_action(‘admin_menu’, ‘yourplugin_menu_’); function yourplugin_menu_() { add_options_page(‘etc etc…

Only show theme option if it option exists

If you’re wanting to output based on the option being defined, then use isset(). e.g. this: <?php echo $up_options->slideshow6; ?> …becomes this: <?php if ( isset( $up_options->slideshow6 ) ) { echo $up_options->slideshow6; } ?> EDIT How would I get the following to appear only if “slideshow6” was defined <a href=”#”><img src=”<?php echo $up_options->slideshow1; ?>” alt=”#”/></a> … Read more

Importing WP settings to another host

Follow the steps: Copy/Move all files to new location Export database from old mysql server and import data in new server (you can use phpmyadmin for that) Select wp_options table using phpmyadmin from new location. Edit 2 entry in option table with option name home and siteurl . set option value = new location url … Read more

WordPress theme options tabs

WordPress includes many js libraries in \wp-includes\js and in wp-admin\js. You can browse through them and choose which one you want, including jQuery tabs. You can use it in your theme by using this function, http://codex.wordpress.org/Function_Reference/wp_enqueue_script To figure out how to use the tabs, you would read about it here: http://jqueryui.com/demos/tabs/

Save Option on Database

<?php add_option( $option, $value, $deprecated, $autoload ); ?> http://codex.wordpress.org/Function_Reference/add_option global $options; ?> <form action=”options.php” method=”post”> <?php $settings = get_option(‘options’); ?> <?php settings_fields(‘theme_options’); ?> <fieldset> <legend>Counter Position:</legend> </br> <p> Right <input type=”radio” name=”position” value=”right”/> <p> Left <input type=”radio” name=”position” value=”left”/> <p> Center <input type=”radio” name=”position” value=”center”/> </fieldset> </form> <?php function r_set() { register_setting(‘theme_options’, ‘options’, ‘validate_options’); } … Read more