Added option to display before or after posts