Pods supports loading template files directly from the theme for a Pod Page.
This requires using the Pod Pages component.
Contents
Pod Page Templates Hierarchy
Pod Page Templates can be automatically loaded from the theme when the Page Template dropdown is left unset.
Code reference
The global $pods variable will be automatically set for you with a Pods object based on the Pod Page associated Pod set. If a slug is provided, that will also be loaded into the context of the Pods object.
If the item was not found based on the slug given to the Pod Page settings, Pods will serve a normal WordPress 404 page.
Example page URL path: “my/pod-page/*” (Page must be created first)
Note: Paths with wildcards treat “*” as a “-w-” character in the template file naming. Page templates will fall back to a potential parent template.
Template Hierarchy (in order of existence check)
pods/pages/my-pod-page-w.php(new path added in Pods 3.2.8+)pods/my-pod-page-w.phppods-my-pod-page-w.phppods/pages/my-pod-page.php(new path added in Pods 3.2.8+)pods/my-pod-page.phppods-my-pod-page.phppods/pages/my.php(new path added in Pods 3.2.8+)pods/my.phppods-my.phppods.php(This can be used like a generic catchall like how WP uses index.php)
You can customize this list using the filter pods_page_default_templates and override the array of files provided (with the .php extension).
Diagram
Here’s a handy diagram that you can use to reference for Pod Page Template Hierarchy.
