How to enable edit button in the theme’s customize UI?

I just had the same issue and with a little googling I found the following solution: // Add the selective part $wp_customize->selective_refresh->add_partial( ‘your_theme_second_logo’, array( ‘selector’ => ‘#yourID’, // You can also select a css class ) ); After you add the custom settings, you need to tell to WordPress what settings you want to manage … Read more

How display widget by id

You can use wp_get_sidebars_widgets() with an “on demand” filter callback. This means we’re adding the filter callback, right before the call to the function and then remove right inside the callback again. This allows us, to use it only once. It also means, that we need to set it right before the call to wp_get_sidebars_widgets() … Read more

Get sidebar parameters (before_widget, before_title, etc.) from within a widget

The parameters are given (as an array) as the first argument provided to the widget method. The second argument, $instance, holds the options for that particular instance of the widget. My usual set up is: function widget($args, $instance){ //Extract the widget-sidebar parameters from array extract($args, EXTR_SKIP); echo $before_widget; echo $before_title; //Display title as stored in … Read more

Storing custom dashboard widget options in wordpress

Solution pulled from OP. Ok fixed. In widget-config.php there is no check if the form has been submitted, so every time you load configuration it updates with empty values or keeps default ones. Add this check if (!empty($_POST)) before updating options values and display stored value of number-input: <input type=”text” name=”number” value=”<?php echo self::get_dashboard_widget_option(self::wid, ‘example_number’); … Read more

Changing name of sidebar widget

Use the ‘Name’ parameter in your register_sidebar call. E.g., see the following code in the default Twenty Ten theme, line 351. function twentyten_widgets_init() { // Area 1, located at the top of the sidebar. register_sidebar( array( ‘name’ => __( ‘Primary Widget Area’, ‘twentyten’ ), ‘id’ => ‘primary-widget-area’, ‘description’ => __( ‘The primary widget area’, ‘twentyten’ … Read more

How to override the wordpress default widget markup

http://codex.wordpress.org/Function_Reference/unregister_widget add something like this to functions.php: if (!function_exists(‘my_unregister_default_wp_widgets’)) { function my_unregister_default_wp_widgets() { unregister_widget(‘WP_Widget_Calendar’); unregister_widget(‘WP_Widget_Recent_Posts’); } add_action(‘widgets_init’, ‘my_unregister_default_wp_widgets’, 1); } Also… you can look at the http://codex.wordpress.org/Widgets_API examples to see how you can extend the WP_Widget class to create custom widgets that you want.

How do i manually place a widget code

Just register another widget area. Don’t take the name sidebar literally, you can use the fields anywhere on your page. In your theme’s functions.php: add_action( ‘after_setup_theme’, ‘register_multiple_widget_areas’ ); function register_multiple_widget_areas() { register_sidebar( array( ‘name’ => ‘Sidebar’, ‘id’ => ‘sidebar’, ‘description’ => ‘describe the function of the box.’ ) ); register_sidebar( array( ‘name’ => ‘Header’, ‘id’ … Read more

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