Hi, is there a way to get the Quiz Image in another page in my template?
I'm building a page that shows previous quizzes, so you can click any to open it in another page.
I would like to show the Quiz Image (the one that is stored in the DB as quiz_image_id in table wp_asq_quizzes) as a thumbnail for each of the quizzes in that page.
I know I can access the quiz image once the quiz loads, but in this page the quizzes are not loaded yet, only listed as posts with the following query:
Code: |
$args_posts = array(
'posts_per_page' => -1,
'order' => 'DESC',
'post_type' => 'aristreamquiz',
);
$post_trivia = get_posts( $args_posts );
foreach ($post_trivia as $post_){
// HTML to print each quiz entry
}
|
So, can I get the quiz image having the post ID of said quiz?
Thanks!