I want to make amp based static page like html but whenever i put that in wordpress,
wordpress applies its theme styles and settings
I want that it should not be affected by wordpress atleast not any theme based css or javascript
Thank you all
there must be a better way to do this please help
Thanks again
2
Answers
You are looking for Page templates.
You can refer to @ https://developer.wordpress.org/themes/template-files-section/page-template-files/
In short, you can create a new page template
page-{slug}.php
(save at root). We then need to tell WordPress that this new file is a "template". We can do so through a comment header (bellow is a minimal version of it). You would probably need to include the theme header and footer too.You could create a dedicated PHP template file for that page, which you only assign to that particular page, and which does not contain the
get_header()
function.Since besides not calling the theme stylesheet/s, this will also exclude a lot of other (necessary) functions, you could create a copy of your
header.php
file (in a child theme, if the theme isn’t yours) which contains all the necessary functions and links except the link to the theme stylesheet, and call that "alternative header" file in your template for that page instead of usingget_header()
.