BYU-ODH / wp-humanities-byu

Humanities theme following BYU Official style
2 stars 0 forks source link

Use PHP with PODS with templates #558

Closed WorldsEndless closed 1 year ago

WorldsEndless commented 1 year ago

We get an error that PODS support for PHP in templates is deprecated. Post-Type templates are probably what they mean when they say you should use wp_templates. See this:

https://make.wordpress.org/core/2016/11/03/post-type-templates-in-4-7/

spencercheng commented 1 year ago

After working with Jeremy, pods deprecation warning has been hidden. However, we it hides all errors not just relating to PODS deprication

WorldsEndless commented 1 year ago

What was the trick? If this is stopping all debug warnings, though, it is a problem; we use those warnings heavily during development (and they are sometimes useful during production, too)

spencercheng commented 1 year ago

It is possible to turn it off and on. This is the php code: ini_set('display_errors', 1); ini_set('display_startup_errors', 1); 1 should mean the debug warnings are on currently.

spencercheng commented 1 year ago

using a single- name of the pods template.

WorldsEndless commented 1 year ago

These are the regular templates we use in WordPress, such as single-person.php . We learned that we can add a special comment to the top to get it to apply to different types