Hello,
Thanks for your response. I was wondering what am I doing wrong.
This is my code:
add_filter( 'genesis_post_title_output', 'child_post_title_output', 15 );
function child_post_title_output( $title ) {
global $post;
// change h2 to h1 depending if you have a search page title or not
if ( function_exists( 'relevanssi_get_the_title' ) ) {
$title = sprintf( '<h2 class="entry-title" itemprop="headline"><a href="%s" rel="bookmark">%s</a></h2>', esc_url( get_permalink() ), apply_filters( 'genesis_post_title_text', relevanssi_get_the_title( $post->ID ) ) );
}
return $title;
}
But titles on search is still not highlighted. But once I remove the $post->ID
from function relavanssi_get_the_title()
titles are highlighted but with errors:
“Warning: Missing argument 1 for relevanssi_get_the_title(), called in /home/groupo10/public_html/wp-content/themes/lifestyle-pro/functions.php on line 171 and defined in /home/groupo10/public_html/wp-content/plugins/relevanssi/lib/common.php on line 692”
why is that?
Thanks!