Shortcode for recent questions
Great! Thanks!
Would this be in place of the shortcode or would it be in addition to it on the same page as it?
Also, would this limit to 5 posts automatically?
Thanks,
David_Berman commented
Ok, Thanks!
@David, simply use this PHP:
<?php ap_get_questions(array('showposts' => 5)); ?> <?php if ( ap_have_questions() ) : ?> <div class="ap-questions"> <?php /* Start the Loop */ while ( ap_questions() ) : ap_the_question(); ap_get_template_part('content-list'); endwhile; ?> </div> <?php ap_questions_the_pagination(); ?> <?php else : ap_get_template_part('content-none'); endif; ?>
Please avoid asking question in other question, you can create your own question and its 100% free :D. I just updated my last answer, now it will only show 5 questions. You have to add this code manually in files. or you can install “Shortcode Exec PHP” plugin and then you can directly add this php code widget. cheers.