Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div >
- <table>
- <tr>
- <?php foreach($categories as $category) {?>
- <td>
- <?php
- $args= array( 'posts_per_page' => 8, 'category_name' => $category-name);
- $myposts = get_posts( $args );
- ?>
- <table border=1>
- <thead><?php echo $category->name ?></thead>
- <?php
- foreach ( $myposts as $post ) : setup_postdata( $post );
- if (have_posts()) {
- ?>
- <tbody>
- <tr>
- <td data-points="<?php echo $points ;?>" data-question="<?php echo get_the_content(); ?>"
- data-answer="<?php echo get_the_content(); ?>"
- >
- </td>
- </tr>
- </tbody>
- <br/>
- <?php
- endforeach;
- ?></table><?php
- wp_reset_postdata();
- ?>
- <?php }?>
- </td></tr>
- </div>
- <td data-points="<?php echo $points ;?>" data-question="<?php echo get_the_content(); ?>"
- data-answer="<?php echo get_the_content(); ?>"
- >
Add Comment
Please, Sign In to add comment