fix posts template: check posts variable, not date