Hello,
It is possible to use MB View shortcode to get the relationship of the post, add the View shortcode to the loop item and show related posts. You can use the WordPress function get_the_ID()
to get the post ID of the current post in the loop. Then get the relationship based on the post ID.
For example: I have a relationship between 2 CPT: from Post to My Job, relationship ID post-to-job
and I'm using the Elementor widget Loop Grid to show a list of posts and related job posts. The sample View code:
{% set current_post_id = mb.get_the_ID() %}
{% set args = { post_type: 'my-job', relationship: { id: 'post-to-job', from: current_post_id } } %}
{% set job_posts = mb.get_posts( args ) %}
{% for job_post in job_posts %}
Related Job: {{ job_post.post_title }} <br />
{% endfor %}