Related Post Category Filter
Related Post Category Filter
Related Post Category Filter
I think what you are looking for was answered here: Theme Activate Hook
Ehm, yea. I don’t know what exactly your problem is, so some notes about the code below. You should use the settings API. Here’s a (new) tutorial by Chip Bennet. The way you’re calling your currently set options (one get_option call per sub-array) you have about 11 db-calls only for your options. If you don’t … Read more
Why not output your Theme’s custom Widgets using the_widget(), inside of a if ( ! dynamic_sidebar( ‘sidebar-name’ ) ) conditional? e.g. <?php if ( !dynamic_sidebar( ‘sidebar-right’ ) ) { $widgetsidebarrightargs = array( ‘before_widget’ => ‘<div class=”widget”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<div class=”title widgettitle”>’, ‘after_title’ => ‘</div>’ ); the_widget(‘WP_Widget_Calendar’ , ‘title=” , $widgetsidebarrightargs ); the_widget( … Read more
Use standard echo or printf with additional parameters. e.g. if(isset($option[‘borderradius’]) && (!empty($option[‘borderradius’]))) { $borderradius=”.post { “; $borderradius .= ‘border-radius: ‘ . $option[‘borderradius’] . ‘px; ‘; $borderradius .= ‘-webkit-border-radius: ‘ . $option[‘borderradius’] . ‘px; ‘; $borderradius .= ‘-moz-border-radius: ‘ . $option[‘borderradius’] . ‘px; ‘; $borderradius .= ‘}’; echo $borderradius; } if(isset($option[‘borderradius’]) && (!empty($option[‘borderradius’]))) { printf(‘.post { … Read more
Referring to this post How to use media upload on theme option page? Check if you find anything helpful. Thanks!
A little tricky to say by looking at code alone. The first thing you need to check in such cases – if your validation function receives data from submitted form. var_dump() input and die; right after that to stop execution and prevent redirect back. Depending on what you get there (if anything) check back through … Read more
What output do you get on-submit, if you add the following to the top of your sanitization callback: var_dump( $input ); die; i.e. add it here: function theme_options_validate( $input ) { var_dump( $input ); die; Compare the results with and without TinyMCE. Let’s figure out what’s changing. Also: this isn’t directly related to the issue … Read more
Core site functionality really shouldn’t be so tightly coupled to the theme. This is why the plugin system exists. If it’s not too late I would recommend exploring alternatives. That said, anything happening on the admin side is in the theme’s functions.php file, or is included via that file. As long as that file and … Read more
First: Write false === get_option( ‘whatever’ ); – see Coding Standards. Second: Why do you have a variable-variable in there? $$value[‘id’] = $value[‘std’];.