• Resolved stijndn

    (@stijndn)


    Hello,

    I would like to use pods shortcodes in pods templates.

    For example: I made a pod “info”. And I want to show a certain “info” in a template of teammembers. So I write in the template teammember, for example

    <h1>{@post_title}</h1>
    {@post_content}
    [pods name=”info” id=”5″ template=”info-template”]

    When in the template “info-template” there is: {@post_content}, it does not work. I got the message: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes) in …/private_html/wp-content/plugins/pods/components/Templates/Templates.php on line 597

    When {@post_content} is not in the template “info-template” it works.

    The shortcode with in the template {@post_content}, works perfect on a regular page.
    Could this be a bug? And could this be fixed.

    Thanks for helping out.

    Stijn

Viewing 4 replies - 1 through 4 (of 4 total)
  • try:

    <h1>[pods]{@post_title}[/pods]</h1>
    [pods]{@post_content}[/pods]
    [pods name="info" id="5" template="info-template"]

    You have to use the [pods] shortcode to close the loops before you add a template, is my understanding. Don’t close that last line though unless you are going to use another field or template.

    Thread Starter stijndn

    (@stijndn)

    Thanks for trying to find a solution for my problem.
    I tested it, but the problem still occurred. The problem is really with {@post_content} in the info-template, because if there is no {@post_content} in that template it works. And that is just what I need.

    Plugin Support Paul Clark

    (@pdclark)

    It’s difficult to debug this without knowing what exactly info-template contains, and what’s in post_content. Given the nature of the error, a first step would be to check for infinite loops: does the referenced post_content contain something that could cause the template to eventually refer back to itself or another content item that would run infinitely (until memory runs out)?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Closing topic due to inactivity.
    Feel free to reach out if you still need help!

    Cheers, Jory

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pods shortcode in templates’ is closed to new replies.