Help needed with php templates
-
I’ve just encountered an issue having updated PODS to the latest version and broken my site because of changes to php support. It’s been restored to the older version now, but is there anyone who can help me navigate my way through what needs to be done?
I posted the above elsewhere but was kindly asked to start my own query. I’m posting the exchanges so far:
Plugin AuthorScott Kingsley Clark (@sc0ttkclark) has already replied :
This may help you bring your templates into your theme: https://docs.pods.io/displaying-pods/pod-template-hierarchy-for-themes/ and there’s also the Pods component “Migrate: Pod Page and Pod Template PHP into File-based templates” you can enable at Pods Admin > Components. That tool will help you export them to the file-based templates automatically in most cases.
If you still require PHP support for your templates, you can choose the alternative route of using the following code: https://gist.github.com/sc0ttkclark/35a15e6f93622c45f12d671184fb1315
patsky (@patsky)
Hi Scott. Thank you for your reply and I’ve looked at that page but not really understanding what I need to do.
Currently my templates are called in the WordPress pages I have set up using the Template box -‘page-witnesses.php’ and ‘page-testimonies.php’ are located in the root of the child theme.
Also in root are 4 ‘taxonomy-‘ files.
in a folder ‘pods-custom-templates’ I have templates :
content-witnesses.php
content-day.php
content-people.php
content-testimonies.phpIn some pages I use the pods shortcodes to display content where no filtering is necessary.
If I’m understanding, I can still use the php templates but do they need to be put in a different location in my child theme or is their content put someplace else? Sorry if I’m seeming dumb! I’d be very grateful if you could give me a complete example please.
The topic ‘Help needed with php templates’ is closed to new replies.