Wordpress: Conditions and calculations are not working.