Conditions not working properly on WP Site