Design of “related posts”-list using inside post
-
Hello,
I have a custom post type “persons” with a lot of custom fields (name, birthday, image…) and made an output-template with the file templates/parts/content/singular/post_content.php.
At the end of each post of the person-detail-page I’m showing the name and thumbnail of three other persons, whose birth was in the same year. That is working good with this code:$posts = get_posts(array( 'post_type'=> 'person', 'posts_per_page'=> 3, 'orderby' => 'rand', 'meta_key' => 'birthday', 'meta_query' => array(array('key' => 'birthday', 'compare' => 'REGEXP', 'value' => $year.'-[0-9]{2}-[0-9]{2}',
Now I would like to use for this output the style of the ‘related posts’, which customizr automatically sets to the end of the posts (see screenshot).
ScreenshotHow can I use the carousel-functionality of the ‘related posts’ respectively where can I find the code and paste it within my custom post type?
Thank you very much in advance! ??
Andreas
- The topic ‘Design of “related posts”-list using inside post’ is closed to new replies.