Is it possible to create another widgets.php page? say widgets-ads.php?

I want to make it for displaying ads in my website by drag and drop of widgets in a predefined sidebars.

  • I'm going to guess what you want is to create new widgets, which you can do extending the WP_Widget class with the Widgets API. Take a look at default-widgets.php and see how the widgets bundled with WordPress are coded and go from there. Commented Jan 22, 2015 at 18:58
  • You can also register new sidebars using the Widgets API
    – Tom J Nowell
    Commented Jan 22, 2015 at 19:07
  • It's not about using the same widgets.php page in the admincp, it's about creating a new widgets page with sidebars and widgets in it, separated from the default widgets.php.
    – Ahmed Saad
    Commented Jan 22, 2015 at 19:09

2 Answers 2


you would need to create widget areas and new widgets http://codex.wordpress.org/Widgetizing_Themes

  • Answers like rely on links aren't very helpful because if the link goes bad or changes, the answer becomes useless. Maybe you could add some example code for registering a new widget and explain the process? Commented Jan 22, 2015 at 19:53
  • even if that is a codex link? would it be better if I took that same info and pasted it here? what about the Widgets API link you gave?
    – Ray Flores
    Commented Jan 22, 2015 at 19:59
  • I gave it in a comment. Even if it's the codex, yes, see how to answer. And welcome to WordPress Stack Exchange! Commented Jan 22, 2015 at 20:01
  • yes, well, the only way i could add a comment was to have more rep :) which i could not do yet :) so i was looking to just add a 'comment' and found this was the only way... sorry for barging, and thanks for the welcome :)
    – Ray Flores
    Commented Jan 22, 2015 at 20:09

If you are not into coding you can simply use a plugin that permits multiple sidebars. Go to the Plugin repository and search for sidebars. Several of the plugins permit the establishment of multiple sidebars and permit using a different sidebar on on each page/post/category. Then just put different widgets in each sidebar to have the ads change.

Or, going another way use a plugin like Widget Visibility to use a single sidebar and then set a particular widget to display only on specific pages/posts. This capability is also included in a Jetpack module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.