Style every second widget?

Use the dynamic_sidebar_params filter. The following code adds classes to say whether the widget is odd or even, what index it is in the sidebar, and what sidebar it’s in. Note: the str_replace(“class=\””, “class=\”$class “, $before_widget); code below depends on your before_widget using double quotes — it probably should be done with a regular expression … Read more

Replace dashboard widgets with banner ad

Check this reference http://www.wpbeginner.com/wp-themes/how-to-add-custom-dashboard-widgets-in-wordpress/ for adding dashboard widget Remove Widgets in Dashboard for removing dashboard widget add_action(‘wp_dashboard_setup’, ‘example_remove_dashboard_widgets’ ); function example_remove_dashboard_widgets() { remove_meta_box( ‘dashboard_quick_press’, ‘dashboard’, ‘side’ ); remove_meta_box( ‘dashboard_recent_drafts’, ‘dashboard’, ‘side’ ); remove_meta_box( ‘dashboard_primary’, ‘dashboard’, ‘side’ ); remove_meta_box( ‘dashboard_secondary’, ‘dashboard’, ‘side’ ); remove_meta_box( ‘dashboard_browser_nag’, ‘dashboard’, ‘normal’ ); remove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ ); remove_meta_box( ‘dashboard_recent_comments’, ‘dashboard’, … Read more