Archived topic
Hide custom css code
1 reply · Started by meg on November 5, 2020
Hi David,
Is there any way to hide the custom css code from displaying in the page source files?
ie. all of my 'custom css' code shows in the page sourse files under <style id="wp-custom-css">
Thank you!
Hi,
I'm afraid there's no 100% way of doing this.
While you can do source padding or disabling right click to prevent users from checking your page source the normal way, there's an easy workaround for this.
You can try JavaScript encryption for your site, but the problem here is, you may lose traffic because some users choose to disable JS. Plus it isn't exactly secure either because users who actually understand JS can easily decrypt your site.
While Googling things will offer solutions like HideJS, these aren't exactly made for WordPress. It's pretty much out of GeneratePress' scope of support.