How to enable/disable a hook with theme options

Actually all I had to do is, run theme options inside the function, like this: function mytheme_under_construction(){ global $mytheme; if(!empty($mytheme[‘offline_id’])){ // if user is logged in, don’t show the construction page if ( is_user_logged_in() ) { return; } $protocol = $_SERVER[“SERVER_PROTOCOL”]; if ( ‘HTTP/1.1’ != $protocol && ‘HTTP/1.0’ != $protocol ) $protocol=”HTTP/1.0″; // 503 is … Read more

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

theme options not saving

Your register_setting() should be for all fields like below function register_mysettings() { //register our settings register_setting( ‘theme-settings-group’, ‘facebook’ ); register_setting( ‘theme-settings-group’, ‘twitter’ ); register_setting( ‘theme-settings-group’, ‘pinterest’ ); register_setting( ‘theme-settings-group’, ‘googleplus’ ); //etc } Do this for all fields and let me know if you stuck at anything

WordPress Setting page can not be saved by html radio

I believe the problem could be with your add_menu_page() function. You have your 3rd parameter set as ‘8’ and that is a deprecated use of that particular parameter (capability). See: http://codex.wordpress.org/Function_Reference/add_menu_page and http://codex.wordpress.org/User_Levels You should try changing that to the correct string representation.

“No Data Received” error in Chrome every time i try to update the theme functions file

I contacted GoDaddy support and they advised me to login to the hosting manager and make the edits to the functions.php file from there. That way it worked ! Though i still couldn’t figure out why i was getting that problem when i tried to edit it from within my WordPress dashboard, but anyways the … Read more

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