I am having problems displaying Pods data in a custom WordPress template using the Roots Theme
I have setup a “Products” Pod, a Pods page “products/*” that has been assigned the custom WordPress template. Roots uses a Theme Wrapper file that doesn’t appear to work on Pods pages. Has anyone come across this before and perhaps found a solution?
You can add a custom template and put pods_content() in it where you want to output the content.
Or you can hook into
get_template_part_templates/content
and check the second value for ‘page’ and then run the pods_content() there.I have no idea if this is a “good” solution or not. I started using WordPress yesterday.
That said, here’s my solution which seems to work well.
In your pods page templates put the output for the page into $pods_content
Then in base.php replace the roots_template_path include with this: