No worries, if your website got infected with malware, it does not mean all of your hard work is lost yet. An infected WordPress site can be cleaned up using such plugins as WordFence or Anti-Malware Security. You can also find an easy to use step by step tutorial on how to clean up an infected WordPress site using the WordFence plugin here.
To avoid similar issues in the future, we would recommend updating, backing up your WordPress site as often as possible and avoiding themes/plug-ins from unknown or 3rd party providers, as well as keeping only the most up-to-date plugins on your site only. For more advice on how to secure your WordPress site from any intrusions and unwanted hackers check out this guide here.