Advertisement
internalops

MB View Code

Mar 8th, 2024 (edited)
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. {% set args = { post_type: 'alternative' } %}
  2. {% set alternatives = mb.get_posts ( args ) %}
  3. {% for alternative in alternatives %}
  4. {# {{ alternative.post_title }} #}
  5. {% set software_args = { post_type: 'software', relationship: {id: 'software-cpt-and-software-alternatives-cpt', to: alternative.ID} } %}
  6. {% set softwares = mb.get_posts ( software_args ) %}
  7. {% for software in softwares %}
  8. {# {{ software.post_title }} #}
  9. {% set software_reciprocal_args = { post_type: 'software', relationship: {id: 'software-cpt-reciprocal-relationship', to:software.ID} } %}
  10. {% set software_reciprocals = mb.get_posts ( software_reciprocal_args ) %}
  11. {% for software_reciprocal in software_reciprocals %}
  12. {{ software.post_title }}
  13. {% endfor %}
  14. {% endfor %}
  15. {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement