Hi.
I am trying a simple test in functions.php file.
add_action( 'generate_after_content', 'hp_related_posts' );
function hp_related_posts() {
global $post;
if ( is_single() ) {
$output = '<div class="related-posts">';
$output .= $post->ID;
$output .= '</div>';
}
return $output;
}
So, I assumed that before closing of the inside-article div, a new div, related-posts, will appear. However, nothing there when opening any post. Did I do something wrong? Please advice.
Thanks.