如何在第2段之后向我的文章显示相关帖子?

How do I display random posts in WordPress article after 2 paragraf Wordpress?

enter image description here

You can create a shortcode for that, like this:

function sc_random_post( $atts, $content = null ) {

    $html = '';

    $posts = get_posts('orderby=rand&numberposts=1');

    foreach ( $posts as $single_post ) {

        $html .= '<a href="' . get_the_permalink( $single_post ) . '" title="' . get_the_title( $single_post ) . '">' . get_the_title( $single_post ) . '</a>';

    }


    return $html;

}
add_shortcode( 'random_post', 'sc_random_post' );

And then you can just use it in the content:

bla-bla-bla
[random_post]
bla-bla-bla

You could develop it further to exclude the post you are currently in - so the random would never give you the post the visitor is reading.