Tagged: related posts
Hallo,
ähnliche Beiträge sind im Bloglayout aktiviert und erscheinen in Beiträgen aus dem Classic editor, aber nicht in Bertägen aus dem advanced Editor.
Hallo hansloe,
Could you post a link to where we can see the problem in question please?
LG,
Rikard
Hello Rikard,
posts, edited by classic editor show at the end of page related posts “das könnte dich auch interessieren” (this could be interesting for you too) https://deingruen.de/bauanleitung-aussentreppe/
posts, edited by advanced layout builder however don’t show any related posts at all. https://deingruen.de/der-schnitt-ist-entscheidend/
Now i want to change all posts, to edit by advanced layout builder, but i also want to show related posts
how can i manage it?
Hi,
The related posts is not included automatically with the Advanced Layout Builder posts. But you can add it with a shortcode just be sure that your post shares tags with other posts, as this is what the element uses to get the other posts.
Try adding this code to the end of your functions.php file in Appearance > Editor:
function related_posts_shortcode( $attr ) {
ob_start();
get_template_part( 'includes/related-posts' );
return ob_get_clean();
}
add_shortcode( 'rpost', 'related_posts_shortcode' );
and then add this code in a “code block” element to display the related posts element:
[rpost]
Best regards,
Mike
Hello Mike,
thank you for reply. But for more than 100 posts it is too much effort. So i manage it by a plugin.
best regards
Hans