display posts in the category correctly
using new php if else structure