How to Disable Color Options?

In TwentyTen’s functions.php the custom background is added in twentyten_setup() which is called on the action ‘after_setup_theme’. So, in your child theme, the following should remove the option completely: // Higher priority to work after TwentyTen add_action( ‘after_setup_theme’, ‘wpse12934_remove_custom_background’, 20 ); function wpse12934_remove_custom_background() { remove_custom_background(); }

Need some PHP schoolin’! passing var to url and the old options table

PHP (as usual) has some nifty stuff, namely http_build_query() for putting together URL requests. However for some reason (historically) PHP4 compatibility and encoding issues currently WP maintains fork of that function internally and offers build_query() wrapper, as well as nifty higher level function for URL manipulation add_query_arg() and remove_query_arg().

Undefined index: debuging error for theme option template snippet

Looking at your actual source, the relevant portion (with line numbers) is this: 745 if ( $_GET[‘page’] == basename(__FILE__) ) { 746 747 if ( ‘save’ == $_REQUEST[‘action’] ) { 748 749 foreach ($options as $value) { 750 update_option( $value[‘id’], $_REQUEST[ $value[‘id’] ] ); } 751 752 foreach ($options as $value) { 753 if( isset( … Read more

register_setting and AJAX?

WordPress already provides a very nice API for admin / option page tabs. No need to reinvent the wheel on that one. Your Ajax action is “options.php” You need an action that’s linked to a PHP function that gets included by add_action( ‘wp_ajax_YOUR-ACTION-NAME*’, ‘your_php_function’); * YOUR-ACTION-NAME is the action you defined when localizing the script … Read more

wordpress theme option in other templates

If you are using some custom global theme options, I’d set them in functions.php. Then you access them from any template if you declare them global first. // functions.php <?php $aagt_fb_url=”foo”; – // template file like header.php, index.php, etc. <?php global $aagt_fb_url; echo $aagt_fb_url;

Working with post values in the admin panel

I solved it this way <form name=”input” action=”<?php echo get_bloginfo( ‘template_directory’ ).”https://wordpress.stackexchange.com/”.’post_options_from_form.php’; ?>” method=”post”> although i wanted post_options_from_form.php to be an admin page. Edit: This finally worked as i was able to post to the admin page i created <form name=”input” action=”admin.php?page=admin_page” method=”post”> On the function, function admin_page() { require(‘post_options_from_form.php’); }

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