Hi @bsmolyanov ,
Thanks for your kind words!
Yes, it’s possible to output other details of the connected posts. If you use a snippet that is similar to the documentation, then you can see, it’s just a standard WordPress loop. So you can use normal WordPress functions such as “the_title()” and “the_content()” to output these details.
Thank you so much for your reply. We need a bit more hand here.
We use this code in the functions.php file:
add_action( 'mb_relationships_init', function() {
MB_Relationships_API::register( [
'id' => 'posts_to_pages',
'from' => 'post',
'to' => 'post',
] );
} );
and we use this shortcodes in the body of the post:
[mb_relationships id="posts_to_pages" direction="from" mode="ul"]
[mb_relationships id="posts_to_pages" direction="to" mode="ul"]
These settings provide nice list of ‘from’ and ‘to’ post titles, whicih include links to the specific posts.
We just need to display the posts excerpts below each post title.
Do we need to add something in the functions.php file or do we need to add something to the shortcode? If yes, could you please write it.
Maybe something like this, but where to put it if its correct at all?
<?php
$my_excerpt = get_the_excerpt();
echo $my_excerpt;
?>
Thank you very much!
-
This reply was modified 5 years, 10 months ago by
bsmolyanov.
-
This reply was modified 5 years, 10 months ago by
bsmolyanov.