Conditions not working in Wordpress