I would like to place content in a sidebar of my blog articles when they are viewed in the archive, but not show this content when the blog articles are shown on the main page of my site.

Can this be done?


Another approach: edit your theme files. archive.php can simply not call in the sidebar, and that will do what you're asking.

Have a look at the Template Hierarchy for a view of what the individual files in a theme take care of.


Wrap the content in a conditional:

if( is_archive() ){
  // Do stuff

More on conditionals here:



I would recommend setting up multiple sidebars. Then you can call one sidebar for regular pages and a different sidebar for archive pages. This gives you complete control over which elements appear in the sidebar on each type of page.

Here's a good tutorial on creating multiple, widget-ized sidebars. You can manage each in the Appearance >> Widgets section of the admin dashboard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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