modified code for template custom headers in each post 26