Refactor how posts section gets auto-opened