Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2020
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <section id="<?=esc_html(strtolower(get_the_title()))?>" class='page'>
  3. <?php
  4.  
  5. $businessPackages = get_posts(array(
  6. 'post_type' => 'service_packages',
  7. 'posts_per_page' => '-1',
  8. 'tax_query' => array(
  9. array(
  10. 'taxonomy' => 'service_category',
  11. 'field' => 'slug',
  12. 'terms' => 'itsupport',
  13. )),
  14. 'meta_query' => array(
  15. array(
  16. 'key' => 'service_type',
  17. 'value' => 'business',
  18. 'compare' => '='
  19. )),
  20. ));
  21.  
  22. ?>
  23. <div class='cursor'></div>
  24. <?php get_sidebar();?>
  25.  
  26. <?php
  27. $tags = get_tags(array(
  28. 'hide_empty' => false
  29. ));
  30. ?>
  31. <style>
  32. img{
  33. height: 100px;
  34. paddding: 16px;
  35. }
  36. </style>
  37. <table>
  38.  
  39. <tr class='package__heading'>
  40. <th>Tags</th>
  41. <?php foreach($businessPackages as $package): ?>
  42. <? error_log(var_export($package, true)); ?>
  43. <th><?=get_the_post_thumbnail($package)?> </th>
  44.  
  45. <?php endforeach; ?>
  46. </tr>
  47.  
  48.  
  49. <?php foreach ($tags as $tag) : ?>
  50. <tr style='text-align: center;'>
  51. <td><?=$tag->name?></td>
  52. <td>✓</td>
  53. <td>✓</td>
  54. <td>✓</td>
  55. <td>✓</td>
  56. <td>✓</td>
  57.  
  58.  
  59. </tr>
  60. <?php endforeach; ?>
  61.  
  62. </table>
  63.  
  64.  
  65. <table>
  66. <?php foreach($businessPackages as $package): ?>
  67. <tr>
  68. <th><?=get_the_post_thumbnail($package)?> </th>
  69. <?php foreach( get_field('package_features', $package->ID) as $help ) : ?>
  70. <td><?php echo $help->name; ?></td>
  71. <?php endforeach;?>
  72. </tr>
  73. <?php endforeach; ?>
  74. </table>
  75.  
  76.  
  77. </section>
  78. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement