Can’t add options to db

Just tested your code, found an error in the input name. Change currency_options_group to currency_options will make it work. The modified code: add_action(‘admin_init’, ‘currency_options_set’); add_action( ‘admin_menu’, ‘admin_menu’ ); function admin_menu () { add_options_page( ‘Currency Options’,’Currency Options’,’manage_options’,’options_currency’, ‘settings_page’ ); } function currency_options_set(){ register_setting( ‘currency_options_group’, ‘currency_options’ ); } function settings_page () { $default_options = array( ‘currency_eur’ => … Read more

Make Theme Options Menu item more easily / directly accessible

Theme Options page under Appearance are added by this function. <?php add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function ); ?> To make it appear outside as a top level menu page replace it with following. <?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function,$icon_url, $position ); ?> Where $page_title :The text to be displayed in the title tags … Read more

Build Form on Dashboard

After did many trials and errors, finally I found the answer. Just in case anyone wondering how this working, I put the full code right here : /* == THEME OPTIONS == */ add_action(“admin_menu”, “setup_theme_admin_menus”); function setup_theme_admin_menus() { add_submenu_page(‘themes.php’, ‘Generate Coupons’, ‘Generate Coupons’, ‘manage_options’, ‘generate-coupons-elements’, ‘theme_generate_coupons_settings’); } function theme_generate_coupons_settings() { ?> <div class=”wrap”> <?php screen_icon(‘themes’); … Read more

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