Skip to content

Instantly share code, notes, and snippets.

@rahularyan
Last active November 21, 2017 14:12
Show Gist options
  • Save rahularyan/5fb2c5078fe8fde4fc87ce247698b15a to your computer and use it in GitHub Desktop.
Save rahularyan/5fb2c5078fe8fde4fc87ce247698b15a to your computer and use it in GitHub Desktop.
<?php
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]';
}
}
add_filter( 'the_title', 'my_ap_the_title', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment