This solution only works on a CMS template page. Please check
Blog Post Template
to see how to implement this solution.