Created
February 16, 2018 21:14
-
-
Save jwwicks/4eb41f4b4bca3756803c8a6a2c1e3820 to your computer and use it in GitHub Desktop.
Gantry Particle using Twig and PODS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends '@nucleus/partials/particle.html.twig' %} | |
{# Query Parameters #} | |
{% set query_parameters ={ | |
'cat' : '-1', | |
'post_type' : 'pods-post-type', | |
'post_status' : 'publish' | |
} %} | |
{% set articles = wordpress.call('Timber::get_posts', query_parameters) %} | |
{% block particle %} | |
{% for article in articles %} | |
{% filter shortcodes %} | |
[pods name="pods-post-type" id="{{ article.ID }}" template="Pods Template Name"] | |
{% endfilter %} | |
{% endfor %} | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment