Archived topic
Add widget to specific page type
5 replies · Started by Deepak on September 7, 2020
Hi,
I have installed a third party widget for related posts. Now this related posts is shown in the right sidebar but only on posts. But on remaining website such as homepage, archives, the right sidebar is empty so I plan to add recent posts widget but only for homepage and archives.
How can I use hooks to accomplish this?
Regards
Deepak
Hi there,
A plugin like this might be what you're looking for: https://wordpress.org/plugins/content-aware-sidebars/
Let us know :)
Hi Tom,
Thanks for your response.
But I was hoping to do this without any plugin.
Can't we do this using Elements and display rules?
Regards
Deepak
The plugin solution Tom suggested is definitely better if you are adding some plugin widgets.
Block element is meant for if you are building any custom layout sidebars etc.
I think the plugin should have minimal impact on your site :)
Thanks, for now seems to be working. I will run some more tests and then mark this as resolved.
No problem :)