Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php $args = array (
  2. 'posts_per_page' => '-1',
  3. 'post_type' => 'works'
  4. );
  5. $work_list = new WP_Query($args);
  6. ?>
  7. <?php if( $work_list->have_posts() ):?>
  8. <?php while( $work_list->have_posts() ) : $work_list->the_post();?>
  9. <?php
  10. echo ' <div id="work-post">
  11. <a href="'. get_permalink($post->ID) .'">
  12. <div id="work-thumbnail">
  13. <img src="' . get_field("work_image") . '" alt="Avatar" class="image">
  14. </div>
  15. </a>
  16. </div>';
  17. ?>
  18. <?php endwhile;?>
  19. <?php endif; ?>
  20. <?php wp_reset_query(); // Restore global post data stomped by the_post(). ?>
  21.  
  22. foreach(get_the_category as $category) {
  23.  
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement