I have made a couple of custom page templates files:
page-florida.php
page-texas.php etc.
Now I want to add some php after the_content so that each page template get their own php addition script just after the content.
I am thinking something along the lines of adding to the functions.php - but I am having trouble properly identifying the right page template, for instance "page-florida.php" ...
function floridacontent($content) {
global $post;
if ($post->page_template == 'florida') {
$content .= 'Forida added content';
}
return $content;
}
add_filter('the_content', 'floridacontent');
page_template
, the template file name is really in this variable.