“Theme without sidebar.php is deprecated”

The call actually comes from themes compat like you can read here in source. So I’d imagine that you simply copy pasted the complete contents and therefore just added the _deprecated_file() call as well. 😀 Lesson to learn from this: Never blindly copy paste stuff without understanding what it does and why it does it.

How to use my menu PHP code as sidebar?

wp_nav_menu is a standard WordPress function, so you would just copy/paste that PHP code into sidebar.php using whatever additional arguments you need. However, since the theme has a sidebar.php it probably has widget areas, so I would look in Appearance > Widgets in the dashboard and look for a sidebar widget area. In there, I … Read more

sidebar parameters (before_widget, before_title) not Working

The issue is in your params array. There was a missing closing > in before_widget and before-title should be before_title. Try this: array( ‘name’ => ‘Sidebar’, ‘id’ => ‘sidebar-1’, ‘class’ => ‘custom’, ‘description’ => ‘Standard Sidebar’, ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</aside>’, ‘before_title’ => ‘<h1 class=”widget-title”>’, ‘after_title’ => ‘</h1>’, ) Hope it … Read more

How do you Permanently Delete Sidebars

Thanks for the comment @Rarst! That was the issue. For whatever reason I had that extra sidebar method call in there and that was causing the problem. register_sidebar( array( ‘name’ => ‘Sidebar’ ) ); register_sidebar( array( ‘name’ => ‘Sub Menu’ ) ); WordPress saves the data from the widgets in the DB but it doesn’t … Read more

Dynamic_sidebar inside wp_nav_menu

You can add extra items in menu like add_filter( ‘wp_nav_menu_items’, ‘your_custom_menu_item’, 10, 2 ); function your_custom_menu_item ( $items, $args ) { if ($args->theme_location == ‘[YOUR-MENU-LOCATION]’) { $items .= ‘–YOUR EXTRA STUFF HERE–‘; } return $items; } Hope it will help!

How do I make the category sidebar widget (stock) display the total # of posts including those in subcategories?

This isn’t THE answer, but it’s one answer. Quick fix: Have my clients check two boxes whenever they use a sub-category. (sub-category box + parent category). This will ensure the post-count is correct. Events [x] Meals and Mission [x] Would love a fix that didn’t depend on clients checking both boxes all the time.

How to call widget by widget’s id?

You can display the specified widget using the_widget. It takes the class name of the widget as an argument (not ID), so you’ll need to know that info to use it, but this allows you to use a widget outside the sidebar. If you’re looking to run some code based on the presence of a … Read more

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