Rakhitha Nimesh
Rakhitha Nimesh

Reputation: 1451

Create a wordpress plugin for sidebar

I have created a simple wordpress plugin and i want to add it to the sidebar. I can do it with sidebar widgets. But i want to insert it as a plugin.

We can add a plugin to post content using the_content action. Likewise is there a way to add it to the sidebar.

Plz be kind enough to share some ideas about this issue

Upvotes: 0

Views: 474

Answers (1)

John Watson
John Watson

Reputation: 2583

You can try hooking into the dynamic_sidebar action:

 add_action( 'dynamic_sidebar', 'your_function_name' );

It's called once for each widget in the sidebar from wp-includes/widgets.php.

Upvotes: 2

Related Questions