Pods Shortcode Examples

A fairly sophisticated example of displaying multiple items of a Pods Custom Post Type using a specific Pods Template, and styling accordingly:

Syntax (to go between square brackets):

pods name=”testimonial” select”*” where=”post_tag.slug = ‘touchpoint'” template=”Testimonial Pods Template”

Which Produces:

Note there’s enough flexibility with each named div or span to be able to inject content :before and :after the element, as we have with the single and double quotes here for the title and quote content, this being one of the major advantages of combining Pods templating with our visual element templating for extremely fine grained control over the output.

Note also that as a further example of how useful that can be, if you break open the code inspector, you’ll see that each testimonial is correctly marked up as a separate <article> complete with it’s own <header>, <section> and <footer> elements, which allows Google to understand the context of this as a self-contained composition in a broader document. Essentially, you can automate high level SEO in your Pods Templates.

For info on the format and syntax of shortcodes, look here… but then again, as I already said, the Pods Shortcode button in the editor pretty much handholds you through a wizard!

https://pods.io/docs/learn/shortcodes/pods/