I would like to show a widget in only one page of my site, as i can see it is not possible right?
Should i add that for all my site pages or not?
It depends on where you want to show the widget.
Let’s start with the widget area (sidebar) registration:
This is quite simple. We register a new widget area with some custom markup.
Now we have to show it somewhere. We could add a custom action in our
Or we could use an existing action, this would limit the places where the widget is available. For example the action
For a custom action we’d use instead:
There are several plugins that allow to show widgets based on specific conditions:
An alternative solution is given by the following plugin, which allows you to define a custom set of widgets on a per-page basis, directly from the edit page screen:
If you are comfortable editing the templates files for your theme:
is called, and either before or after it, or prettymuch anywhere on your site use:
If you want to be cleaner about it: Create a function in functions.php that would look like:
call the function with:
this has to be called in the loop or where the
Then call that function in your template file (page.php perhaps?) to display your target widgets on only your target page.