SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | ||
3 | // set up the variables | |
4 | $boxes = $list = ''; | |
5 | ||
6 | if( get_field('treatments_featured') ) | |
7 | { | |
8 | // it is a featured treatment, so append the boxes variable with the new element | |
9 | $boxes .= '<div class="fivecol"> | |
10 | <div class="treatimg">' . the_post_thumbnail('medium'). '</div><!--Closing treatimg--> | |
11 | <span class="treattitle">' . the_title(). '</span> | |
12 | </div><!--CLosing fivecol-->'; | |
13 | } else { | |
14 | // it is not a features treatmewnt, so append the list variable with the new li | |
15 | $list .= '<li>' . the_title() .'</li>'; | |
16 | } | |
17 | ||
18 | wp_reset_query(); | |
19 | ?> | |
20 | ||
21 | <div class="treatment"> | |
22 | <!-- display the boxes --> | |
23 | <?=$boxes?> | |
24 | </div><!--Closing treatment--> | |
25 | ||
26 | <ul> | |
27 | <!-- display the lists --> | |
28 | <?=$list?> | |
29 | </ul> |