I just install Wordpress SEO plugin by Yoast, test the title re-write function and it works in my title bar (single post). However when I try to call the title in widget, I just get error message
Warning: Missing argument 1 for kpndg()...
I insert this code in theme functions.php
add_filter( 'wpseo_title', 'kpndg' );
function kpndg( $title ) {
return $title;
}
Then call it in my widget:
$out.='<div class="trending-bar add-active bar-' . $i . '">';
$out.='<a class="trending-link" href="'.get_permalink().'"> </a>';
$out.='<div class="title">'.kpndg().'</div>';
$out.='<div class="trending-color-wrapper">';
$out.='<div class="trending-color-layer"></div>';
$out.='<div class="trending-color"></div>';
$out.='<div class="trending-meta">' . $meta . '</div>';
$out.='</div>';
$out.='</div>';
I can't figure out what is the problem in that code.
FYI: I use Engine theme by Industrial Themes