Added condition to the edit WP link