To change the header ‘Blog – latest news’ to something else you need to add the following code to functions. php:
But how to show the category here?
add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
function fix_single_post_title($args,$id)
{
if ( $args['title'] == 'Blog - Latest News' )
{
$args['title'] = get_the_title($id);
$args['link'] = get_permalink($id);
}
return $args;
}
Hi motylanogha!
Thank you for using our theme.
To get the categories for a post:
$post_categories = wp_get_post_categories( $id );
$cats = array();
foreach($post_categories as $c){
$cat = get_category( $c );
$cats[] = $cat->name;
}
$args['title'] = implode (',', $cats);
Regards,
Günter