Hello,
in this forum I found several hints to change this title to the post title, but I can’t change this. In the official link http://kriesi.at/documentation/enfold/replace-the-default-blog-latest-news-title/ there is a code, but no clear info in which file I have to insert this. I think this is the function.php, but this don’t work.
<?php
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/
?>
<?php
add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
function fix_single_post_title($args,$id)
{
if ( $args['title'] == 'Blog - Die aktuellsten Neuigkeiten' )
{
$args['title'] = get_the_title($id);
$args['link'] = get_permalink($id);
$args['heading'] = 'h1';
}
return $args;
}
?>
Do I have misunderstand something?
Hi Claudia!
You can place it in the bottom of the functions.php file or inside your child theme functions.php file.
If it still does not work then try switching it to this.
add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
function fix_single_post_title($args,$id)
{
if ( is_single() )
{
$args['title'] = get_the_title($id);
$args['link'] = get_permalink($id);
$args['heading'] = 'h1';
}
return $args;
}
Cheers!
Elliott
Hello Elliott,
thanks very much. Now it works.
Claudia