• Resolved hielkio

    (@hielkio)


    Hi folks,

    Hielke here again ?? Can anyone tell me if it’s possible to call a script inside a PODS template. If so, what’s the best way to do this?

    Thank you very much in advance!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    You would call it the same way you would call inline CSS, by wrapping it with the <script></script> tags. We don’t typically recommend this as scripts should be enqueued, etc. so are better placed in your functions.php, but if you need that functionality, that’s how you’d do it.

    This is pretty much out of scope for Pods support as well, as this is just your standard HTML, javascript, css handling. Pods Templates just output the ‘content block’ you give them, whether you place that in a Widget, call it with a shortcode, or use an Auto Template to display them and they run once for each record in the loop they’re provide by those methods.

Viewing 1 replies (of 1 total)
  • The topic ‘Right approach to call Javascript from within template’ is closed to new replies.