Using update_option() and get_option() is echoing escaped strings
You can use PHP’s stripslashes() command: <?php echo stripslashes( get_option( ‘myOption’ ) );
You can use PHP’s stripslashes() command: <?php echo stripslashes( get_option( ‘myOption’ ) );
I think the problem is that you are using uppercase letters in the options id: footer-nav1_URL Try instead: footer-nav1_url In general you should avoid using uppercase letters in options names in WordPress.
If you add tracking code to a theme file you will need to do this on every theme change. It is considered good practice to use plugin for this, like Google Analytics for WordPress. It will use common hooks (that every theme worth using has) to insert code and that way you don’t need to … Read more
The answer is theme depended and since most premium themes have their own framework/options panels then its going to be hard to tell where are the options are saved but in most cases they are saved in the options table in the database. So the tricky part is to know what are the options names. … Read more
Of the few I’ve seen, I think that most “premium” Themes way over-complicate Theme Settings pages. I generally prefer Theme Settings pages that maintain the style/layout of the rest of the WP-Admin UI. So, these would be my rules of thumb: Incorporate meaningful settings, and not necessarily every possible setting under the sun. Organize settings … Read more
Here is one way to do it by extending the control you want to use. Below is an example where we extend the text control and add an extra description like the one seen here on the screenshot: function mytheme_customizer( $wp_customize ) { class Custom_Text_Control extends WP_Customize_Control { public $type=”customtext”; public $extra=””; // we add … Read more
Checkbox is possible. A example, I hope this help you. At first you must define the setting, via add_setting, important is the param type with value option. After this control the field via add_controland set the param type to checkbox. Alternative it is possible to use select. If I add a default value via std, … Read more
You need to add a name attribute to your editors. The name attribute needs to be set to the value of of your option, so like this: function us_partners_cb() { $us_partners_desc = get_option( ‘us_partners_desc’ ); echo wp_editor( $us_partners_desc, ‘uspartnersdesc’, array(‘textarea_name’ => ‘us_partners_desc’) ); }
The answer that yes, the theme_mod functions will be slower, but not significantly, and the benefits outweigh the differences. Theme mods are stored as options. So, in essence, the theme_mod functions are wrappers around the options functions. First, understand that theme_mod settings are stored as an array in a single option, keyed to the specific … Read more