Widget to show posts in the sidebar basing on its IDs

Try to replace ‘post__in’ => array($instance[‘postsToShow’]), with ‘post__in’ => explode(“,”, $instance[‘postsToShow’]), to feed the post__in with an array. Your current array looks like array(“123,456,789”) but should be like array(“123”, “456”, “789”)

Function to add class to element?

That plugin does not create a <form> tag itself. It uses wp_login_form to do that, and that function does not provide a way to add a class to the <form> tag. You can see that by looking at the widget method, which is what generates the front end content. I don’t see a way to … Read more

get dynamic_sidebar() value in array in wordpress

Widgets echo data. Take a look at the widget method of some of the default widgets, like this one. You can’t save that data to an array without writing your own function to process the widgets and using output buffering where the widgets themselves echo content. And sidebars/sidebar-widgets are complicated. That is not an easy … Read more

Simple form to add custom links to menu?

Well, since you’re talking about a widget of Links…. why not just use the default Links widget that was part of core up till 3.5? http://wordpress.org/plugins/link-manager/ If you insist on limiting it to showing the latest 5 links, you’re going to have to write a bit of code (that I’m not convinced is worth it). … Read more

Woocommerce product info in a sidebar?

Checkout the content-single-product.php WooCommerce template for an idea of what functions are hooked where. It is very well commented. When you learn about hooks and filters, all these questions start to become similar. You’ll want to remove the function from it’s current hook and add it to a new hook. This sample includes a fake … Read more

register_sidebar_widget is deprecated since version 2.8

Well… register_sidebar_widget( $name, $output_callback, $classname ); vs. wp_register_sidebar_widget( $id, $name, $output_callback, $options, $params, … ); It is simple enough to check the Codex entries for each: http://codex.wordpress.org/Function_Reference/register_sidebar_widget http://codex.wordpress.org/Function_Reference/wp_register_sidebar_widget Beyond that, I am not quite sure what the question is. You might want to look into the register_widget function instead of either of those, though.

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