Disable a plugin’s widget

You must use widgets_init hook with a high priority for example this will remove the default WP Widgets function unregister_default_wp_widgets() { unregister_widget(‘WP_Widget_Pages’); unregister_widget(‘WP_Widget_Calendar’); unregister_widget(‘WP_Widget_Archives’); unregister_widget(‘WP_Widget_Links’); unregister_widget(‘WP_Widget_Meta’); unregister_widget(‘WP_Widget_Search’); unregister_widget(‘WP_Widget_Text’); unregister_widget(‘WP_Widget_Categories’); unregister_widget(‘WP_Widget_Recent_Posts’); unregister_widget(‘WP_Widget_Recent_Comments’); unregister_widget(‘WP_Widget_RSS’); unregister_widget(‘WP_Widget_Tag_Cloud’); } add_action(‘widgets_init’, ‘unregister_default_wp_widgets’, 1);

what is the best way to add things to a side bar

As you seem to understand from your tags, the user (who would need to have admin-level privileges) can add things to a sidebar via Widgets in Appearance > Widgets. For text and images, the default would be to drag the Text widget into the sidebar, then edit to add the text/image reference. To make this … Read more

Proper approach to moving complete site from one domain to another AND preserve widgets

There are some instances of serialized data in the database, notably in things like widget options, that become invalidated if you do a blind search-and-replace without accounting for different string lengths. You might try a tool like this one to do a search and replace that also handles serialized data: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

Different sidebars not changing

Your main problem is that the is_page() conditional will not return true if it is included inside or after the loop. Your other issue which is not necessarily related to the issue at hand is the way you are including your sidebars. WordPress comes with a handy little function called get_sidebar(). If you have more … Read more

Add a specific css to a widget

If you register your sidebar this way, your all dynamic widgets gets a unique class automatically e.g. – class=”widget-container widget_archive” register_sidebar( array( ‘name’ => __( ‘Primary Widget Area’, ‘twentyten’ ), ‘id’ => ‘primary-widget-area’, ‘description’ => __( ‘The primary widget area’, ‘twentyten’ ), ‘before_widget’ => ‘<li id=”%1$s” class=”widget-container %2$s”>’, ‘after_widget’ => ‘</li>’, ‘before_title’ => ‘<h3 class=”widget-title”>’, … Read more

Display a widget on a specific type of archive

You could use the is_tax() function to accomplish this. The first parameter, the taxonomy slug is optional, but you do want to specify it. This would be something like product-categories. The second, a specific term, is also optional. It’d be perfectly acceptable to have the following: is_tax(‘product-categories’);

Recent Comments from Specific Category Widget

You could get your answer from Kovshenin blog Replace whole if ( $comments ) with this if ( $comments ) { foreach ( (array) $comments as $comment) { $comm_post_id = $comment->comment_post_ID; if ( $category_name ) { if (!in_category( “{$category_name}”, $comm_post_id )) { continue; } } $output .= ‘<li class=”recentcomments”>’ . /* translators: comments widget: 1: … Read more

dynamic sidebar in front page

loop-page.php is the wrong context for what you are trying to do. If you want it to appear on the home page, then you need to edit loop.php, so in your child theme you can either create a file called, loop.php …which should take precedence over the loop.php found in the parent TwentyTen theme or … Read more

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