Paul Wilson
Paul Wilson

Reputation: 3

Headless WordPress & FaustJS - Custom Template Resolution Issue

Got an issue with FaustJS Template Resolution not working in the correct manner.

Using LocalWP, I spun up a blueprint of FaustJS Portfolio site as my first try at headless wordpress. After reviewing the documentation as per this link - https://faustjs.org/reference/template-system

I was able to get route based custom templates to work as expected.

However, the issue is when wanting to use a custom template that isn't reliant upon the URL but what the wordpress user stipulates.

From everything I have done the GraphQL appears to give the correct order/priority of the order in which a page template should be used ['page-test-template', 'page-about', 'page-206', 'page', 'index']

And unfortunately it keeps just using the default page.js within the FaustJS wp-templates folder.

Everything appears to be setup correctly, as mentioned it worked for route based, where for /about/, if I had a file in the same location called page-about.js, then it would resolve and render in the browser.

I'm just unsure what I might be missing OR if this is a known bug for FaustJS.

Any help would be fantastic.

Upvotes: 0

Views: 25

Answers (0)

Related Questions