Modify sidebar display conditions (relevant to pull request #7)