Remove WordPress theme from a specific page

There is a site with WordPress installed and a theme selected. I have created an HTML page for the site, but it wasn’t looking well with the theme. So, I want to put the page on the site without any theme, and just the way I wrote the code, without disabling the theme from any other pages.

Is there an easy way to do it without messing with the theme? And if there isn’t, then I am willing to modify theme files, but how should I go about it?

2 s
2

There is, in fact, a way to do it without messing with the theme, let’s say your WordPress is on public_html/your_site, now you want to create an HTML page that is on your_site.com/mypage, so instead of creating a page or post called mypage on your WordPress dashboard you are going to create a mypage.html and upload it to public_html/your_site, in case you want to get rid of the .html you can simply hide it from your .htaccess doing something like:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]

Keep in mind any tracking code you have on your WordPress, for example, Google Analytics, if you are using things like that you will have to add those codes to your HTML page as well.

Leave a Comment