Add a dropdown to theme customizer

Add Section to Theme Customizer: $wp_customize->add_section( ‘parsmizban_options’, array( ‘title’ => __( ‘Theme Options’, ‘parsmizban’ ), //Visible title of section ‘priority’ => 20, //Determines what order this appears in ‘capability’ => ‘edit_theme_options’, //Capability needed to tweak ‘description’ => __(‘Allows you to customize settings for Theme.’, ‘parsmizban’), //Descriptive tooltip ) ); Add new Setting: $wp_customize->add_setting( ‘bootstrap_theme_name’, //No … Read more

How to use media upload on theme option page?

You are most likely to save the url of the image and not the whole image tag, and there is a great tutorial that explains just how to use the media uploader in your own theme or plugin: http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/ update In case of using this in a meta box you will need the post id … Read more

Switching themes without losing widgets?

Storing widgets is complex topic. Basically it is such a multi-level-array-mess on the inside that very few people try to make sense of it (and even fewer succeed). 🙂 As far as I understand it myself while we can manipulate cute sidebar names on the surface, deep inside it is getting deconstructed to numerical IDs. … Read more

Categorising themes by folders in backend

Updated plugin version available at GitHub. I first saw your Question at [wp-hackers] list, and, after implementing the solution, was about to publish a Q&A for that. Well, it’s already here, and has a bounty put on it 🙂 As Daniel Bachhuber points out in the thread: WordPress.com puts themes inside of subdirectories /wp-content/themes/public /wp-content/themes/premium … Read more

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