generate_after_do_template_part

TheĀ generate_after_do_template_part hook appears at the end of generate_do_template_part() function.

This function is responsible for displaying the content on your page. In archives, it displays each post.

We can use this hook to display something after each post, or after a specific post. For example, this function will output text after the 4th post in your archives:

add_action( 'generate_after_do_template_part', function() {
    global $wp_query;

    if ( 3 === $wp_query->current_post ) {
        echo 'Look at me after the fourth post';
    }
} );