Skip to content

How to use a template for my pod from a php file? #7337

Answered by callmeahmedr
WebDesignWorx asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry it took me a while to get back to you! It sounds like the templates are being successfully created, but they aren't being correctly registered or recognized within the Pods admin interface

Looking at the log I think issue is that the templates may not be properly linked or the template type might not match what Pods expects for specific use cases.

Here's the updated code

/**
 * Automatically initialize and register Pods templates from plugin directory.
 */
add_action('pods_api_init', 'initialize_pods_templates');

function initialize_pods_templates() {
    if (function_exists('pods_api')) {
        $pods_api = pods_api();

        // Define your template files and their names
        $

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@callmeahmedr
Comment options

Answer selected by WebDesignWorx
Comment options

You must be logged in to vote
1 reply
@callmeahmedr
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants