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

The issue of redirecting my site to a new domain

There is a search and replace plugin I have used that works pretty good. http://wordpress.org/extend/plugins/search-and-replace/ In the future I would not hard code any links in if you can help it as well. Use dynamic linking like: $url = site_url(‘/secrets/’); echo $url; or: img src=”https://wordpress.stackexchange.com/questions/81722/<?php echo get_stylesheet_directory_uri() ?>/images/aternus.png” alt=”” title=”” width=”” height=”” /> as an … Read more

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/

Best place to store company address

Create an Option Page and name it something like “Adress”. In Google you will find a lot about Option Pages. For this small Settings, i would not recommend to use a option-framework. Some Links: Nettuts or 12 how to’s.

options validator input is false?

This kind of setup skeleton works for me to process the custom options page input : <?php /* Plugin Name: Settings Skeleton */ if(!class_exists(‘MySettings’)){ function call_my_settings() { return new MySettings(); } if (is_admin()){ add_action( ‘init’, ‘call_my_settings’ ); } class MySettings{ public function __construct(){ add_action(‘admin_menu’, array(&$this, ‘add_menu’)); add_action(‘admin_init’, array(&$this,’settings’) ); } public function add_menu(){ add_options_page(__(‘My Plugin … Read more

Caching of SQL queries

WordPress will only do a database lookup the first time if the option hasn’t been auto-loaded or already accessed prior. The performance hit is negligible, however if you’re loading multiple separate options with a bunch of get_options instead of using the serialised option functionality, then the initial lookup * X number of separate option rows … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)