Hi
All posts on my site have the header “Blog – Latest News” regardless of settings. I’d like the header to be the name of the category it is in, ie News, Events etc etc.
Thanks.
Hi ian_clarke!
Please see – http://kriesi.at/documentation/enfold/replace-the-default-blog-latest-news-title/
Regards,
Yigit
Hi ian_clarke!
Add this to the bottom of your functions.php file.
add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
function fix_single_post_title($args,$id)
{
if ( $args['title'] == 'Blog - Latest News' )
{
$categories = get_the_category();
if ( !empty($categories) ) { $args['title'] = $categories[0]->name; }
}
return $args;
}
Best regards,
Elliott
Thanks for the quick reply Yigit.
Nearly there, what would I need to change to display the category name instead of the post title?
Brilliant, combined the two and got exactly what i was after.
Many thanks guys.