Hi everyone,
I need to self-host my own TNEW template and CSS files on my website. Does anyone have experience doing that with a Wordpress website?
I've made a new page with the visual composer disabled so that I can add the HTML comment:
<!‐‐TNEW content here‐‐>
Once I have a valid SSL certificate and put the TNEW.CSS file with the other CSS files in Wordpress, will this work?
It's possible for this to work, but there are a couple of important things to realize:
1. The template will not be served from wordpress on every single page load. TNEW will load the template from wordpress and then cache it — this means you can't use any per-pageload dynamic content in wordpress and expect it to behave the same way it does when people are browsing your wordpress site as usual.
2. TNEW is basically re-serving the HTML that it loads from your wordpress site, and it does so at a different domain. This is why there is a requirement for the resources in your template HTML to be referenced using absolute URLs. If your template contains a reference to, for example, "/wp-content/images/some.png", when the HTML is re-served to the browser at yourtnewsite.example.com, the user's browser will try to download that resource from yourtnewsite.example.com/wp-content/images/some.png, which will fail, because the resource really exists at yourwordpresssite.example.com/wp-content/images/some.png.