• Hi there,

    I added code into my functions file to make the related posts appear after the content.

    add_filter( ‘the_content’, ‘add_related_posts_after_post_content’ );
    function add_related_posts_after_post_content( $content ) {

    //check if it’s a single post page.
    if ( is_single() ) {

    // check if we’re inside the main loop
    if ( in_the_loop() && is_main_query() ) {

    // add your own attributes here (between the brackets [ … ])
    $shortcode = ‘[related_posts_by_tax format=”thumbnails” taxonomies=”post_tag” posts_per_page=”3″ link_caption=”true”]’;

    // add the shortcode after the content
    $content = $content . $shortcode;
    }
    }

    return $content;
    }

    However, this is inserting the posts before the author bio. How can I add it after the bio?

    Thanks,

    Vironika

    The page I need help with: [log in to see the link]

  • The topic ‘How to add plugin after author bio, not before’ is closed to new replies.