I've made a function to hook after the_content. This is only working on certain pages/posts. It's working on the default template but not on my custom one's.
function insertFootNote($content) {
$content.= "<div>";
$content.="additional content";
$content.= "</div>";
return $content;
}
add_filter ('the_content', 'insertCpontent');
In my custom page template I haven the following code
<?php if(have_posts()): ?>
<?php get_template_part( 'part', 'addressbook' ); ?>
<?php endif; ?>
in the template('part-addressbook.php) I have the following.
echo '<div class="category-description"><p>'.get_the_content().'</p></div>';
On this template part the hook is not working although i'm using the_content/get_the_content function
Why does the hook does not work in this case?