4.1.1 title solved problem
Unfortunately. It did not work. :/ Why do not you answer me?
Question is closed for new answers.
Rahul Aryan selected answer
Hello,
As I can see source code, [[solved]] is only applied to browser title not single question title (I am not sure about reason, may be its not required for SEO anymore!). You can add below code to your theme’s functions.php to fix it:
function my_ap_the_title( $title, $ID ) { $post = ap_get_post( $ID ); if ( 'question' === $post->post_type && ! empty( ap_selected_answer( $ID ) ) ) { return $title . ' [solved]'; } return $title; } add_filter( 'the_title', 'my_ap_the_title', 10, 2 );
Rahul Aryan selected as best answer
Rahul Aryan commented
I don’t see anything wrong in this code. You just want to show in single question page?
neoxi commented
Yeah. you see the answered questions
Rahul Aryan commented
Just add is_question() in if.
neoxi commented
I did not understand. Please write sample code? 🙂
It’s affecting the whole site. This is important for me.