How can you store your option at the permalink settings page?

I ran into this very same issue and I have a workaround. Hopefully it will be fixed in the upcoming 3.3 release as this trac ticket suggests. The workaround basically replicates the important bits of the wp-admin/options.php file where settings registered via the settings API are processed. The reason additional permalink settings do not currently … Read more

If option: show this. Else show nothing

Try this: <?php $options = get_option( ‘schema_theme_options’ ); $meta_desc = $options[‘metadescription’]; ?> <?php if( ( is_home() || is_front_page() ) && ” !== $meta_desc ) : ?> <meta name=”description” content=”<?php echo $meta_desc; ?>”> <?php endif; ?> It’s a bit neater and a bit more foolproof than the other proposed solution.

Theme Option select values

There’re several things to note: get_settings() is deprecated and get_option() should be used instead WordPress comes with a function named select() that takes three arguments: Saved value, looped value, echo You’re better off saving your key, than the HTML capable “title” element in your options. It’s much safer to save in the DB an easier … Read more

WordPress Settings API settings not saving for some users

Here are few remarks after skimming through your code: you are using options name like id, title and global. You should use a prefix on these names, like vegas_, to avoid possible problems with other stuff using these option names. you should let the users know about validation problems (check out the add_settings_error() function) use … Read more

Accept code input into Options Framework

A better approach would be to have the user simply enter their tracking script ID. You know, something like UA-XXXXXXX-XX? Then in your header.php, output the standard tracking script: <?php if ( $ga = get_option( ‘google_analytics’ ) ) : ?> <script> var _gaq = _gaq || []; _gaq.push([‘_setAccount’, ‘<?php echo esc_js( $ga ) ?>’]); _gaq.push([‘_trackPageview’]); … Read more

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