Exemplo n.º 1
0
/**
 * Output answer of active question.
 * @return void
 * @since 2.1
 */
function ap_question_the_answers()
{
    global $answers;
    $answers = ap_get_best_answer();
    include ap_get_theme_location('best_answer.php');
    $answers = ap_get_answers();
    include ap_get_theme_location('answers.php');
    wp_reset_postdata();
}
Exemplo n.º 2
0
<?php

/**
 * Best answer content
 * 	
 * @author Rahul Aryan <*****@*****.**>
 * @link http://anspress.io/anspress
 * @since 0.1
 *
 * @package AnsPress
 */
/**
 * Show best answer
 */
ap_get_best_answer();
if (ap_have_answers()) {
    echo '<div id="ap-best-answer">';
    echo '<h3 class="ap-answers-label"><span>' . __('Best answer', 'ap') . '</span></h3>';
    while (ap_have_answers()) {
        ap_the_answer();
        include ap_get_theme_location('answer.php');
    }
    echo '</div>';
}