How to remove content from hacked pages? [closed]

If you have a backup of your site from before the hack, just restore it. (If you don’t, consider making backups next time!)

Otherwise, you’ll have to review the code in every file in your theme and plugins to find the nasty bits. To expedite the process, you can update/re-install themes and plugins from third party sources to overwrite the hacked bits.

If you have any custom plugin and/or a child theme, these are the only parts you’ll have to review manually and carefully – no one here can help you with this part though.

Once you recovered your site, don’t forget to take appropriate steps to secure it, and make and keep backups on a regular basis to avoid getting in a similar situation again in the future!