Hook to add page title to posts page

Recommended Posts

funken
0

funken 0

Trying to add a page title to a posts page. Here's what I've got so far:
`
add_action('pagelines_inside_top_theloop','recent_events');
function recent_events(){?>
<?php if (is_page('recent-events')):?>

Recent Events

<?php endif;
}
`
I've gone over and over it. Any tips? Doesn't seem to be working. The page slug is 'recent-events'. Thanks!

Share this post

Link to post

Share on other sites

timlinson
3

timlinson 3

Hey Ken, looks fine to me (also works fine on my local install).
If you're putting this in platformbase/functions.php (as recommended), double check that PlatformBase is activated in Appearance>Themes.