Magic tags not rendering from templates
-
Hi all,
I’m a new user of PODS, trying to get a site I’m developing for a client up and running. I’ve created a Custom Post Type for publications and I’m trying to write a template that will display each publication and the desired custom fields inside a WordPress page.
Here’s the template code I’m using:
[each post_title] <p> <a href="{@link}">{@article_title}</a><br/> {@author_1} [if @author_2], {@author_2} [/if] [if @author_3], {@author_3}[/if] [if @author_4], {@author_4}[/if] [if @author_5], {@author_5}[/if] [if @author_6], {@author_6}[/if] [if @author_7], {@author_7}[/if] [if @author_8], {@author_8}[/if] [if @author_9], {@author_9}[/if] [if @author_10], {@author_10}[/if] <br/> <i>{@journal}</i>, {@publication_year}, {@pubstatus} <br/> </p> [/each]
And I call that template using a shortcode in the WordPress page:
[pods name="publication" orderby=publication_year template="Publications"][/pods]
Right now the only thing that renders in the page are the commas “, ,” from the last line of the template code. (They appear for the correct number of publications, so there’s that, I guess.) No field information whatsoever appears, even in the HTML source. I can get the custom field magic tags to render if I list them between the [pods][/pods] shortcode, but, in that case, they don’t respond to the conditionals.
In my own troubleshooting, I’ve reverted to the default TwentyTwenty theme and disabled all other plugins. None of those changes affected the behavior. I’ve also simplified the template by removing the link and all the “if” conditionals, but that also makes no difference.
I’m sure I’m missing something simple, but I can’t for the life of me figure out what. Thanks for your help!
Best,
Nicole
- The topic ‘Magic tags not rendering from templates’ is closed to new replies.