How can I automatically redirect anonymous users to a login page?
A solution is to restrict access to the WordPress page that you are inserting the directory short code into. A plugin such as 'Members' allows you to restrict access to pages &amp; posts by user role, customize the message visitors see when they do not have permission and provide a login widget.