dynamic sidebar not showing anything

In your functions.php file try register sidebar without putting in function like this register_sidebar(array( //try not to enclose this in function ‘id’ => ‘primary’, ‘name’ => ‘Primary Sidebar’, ‘description’ => ‘A short description of the sidebar.’, ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h3 class=”widget-title”>’, ‘after_title’ => ‘</h3>’, )); And make … Read more

Adding a widget to a string of HTML

If you want to add the widget area as part of the output var you need to use the ob functions because it is echoed and not returned. Like this: $output .= ‘<div id=”header-image-widget-area”>’; ob_start(); dynamic_sidebar( ‘header_image_widget’ ); $output .= ob_get_clean(); $output .='</div>’;

WordPress menu deletes when trying to add a hook

I don’t think there’s wp_nav_menu action. Perhaps you want the wp_nav_menu filter (doc)? function custom_novice_menu($args) { if( ‘primary’ == $args[‘theme_location’] ) // only apply to the right menu { $args[‘container’] = ‘div’; } return $args; } add_filter(‘wp_nav_menu’, ‘custom_novice_menu’);

Show Specific Footer Widget for Specific Pages

There are several ways you can achieve this: A. Use CSS to hide and show widgets based on which page you are on. This is fine as a workaround, but it isn’t really solving your problem, especially if you have lots of pages/widgets. B. Call a different widget area in your template file with conditional … Read more

How to remove Broken Link Checker widget from admin menu

The problem is probably just that your code runs before broken links checker adds the meta box. Try changing the action line to this: if(is_admin()){ add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’, 1000 ); } EDIT To be a little more clear, the particular issue here is that the add_action() function is running super early compared to Broken Link Checker’s … Read more