Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array('pagename' => 'agenda');
- $agenda_page = new WP_Query($args);
- if($agenda_page->have_posts()) : while($agenda_page->have_posts()) : $agenda_page->the_post();
- ?>
- <section class="content">
- <h3><?php the_field('agenda_list_title'); ?></h3>
- <?php the_field('agenda_list_intro_paragraph'); ?>
- <?php the_content(); ?>
- <?php endwhile; endif; ?>
- <ul class="event-list">
- <?php
- $agenda_posts = new WP_Query(array('post_type' => 'agenda', 'orderby' => 'post_date', 'order' => 'ASC'));
- while ($agenda_posts->have_posts()) : $agenda_posts->the_post();
- if( get_field('2021_agenda')) {
- ?>
- <li class="event" id="agendastart">
- <div class="event-time">
- <?php
- if (have_rows('time_begin')):
- while (have_rows('time_begin')) : the_row();
- $time = get_sub_field('time');
- $time = ltrim($time, '0');
- echo $time;
- the_sub_field('am/pm');
- endwhile;
- endif;
- echo ' ' . __('–') . ' ';
- if (have_rows('time_end')):
- while (have_rows('time_end')) : the_row();
- $time = get_sub_field('time');
- $time = ltrim($time, '0');
- echo $time;
- the_sub_field('am/pm');
- endwhile;
- endif;
- ?>
- </div>
- <?php edit_post_link('[Edit Event]', '<div class="edit-link">', '</div>'); ?>
- <div class="indent">
- <?php
- $c = 0;
- if (have_rows('talks')):
- while (have_rows('talks')) : the_row();
- $title = get_sub_field('title');
- $subtitle = get_sub_field('subtitle');
- $description = get_sub_field('description');
- ?>
- <div class="pretitle"><?=$title;?></div>
- <?php if ($subtitle) : ?>
- <div class="event-title">
- <?php $content = get_sub_field('description'); if ($content) : ?>
- <?php echo $subtitle; ?>
- <br><button onclick="myFunction()">More Details</button>
- </div>
- <div id="myDIV">
- <?php echo $description; ?>
- <?php else: ?>
- <?php echo $subtitle; ?>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- <ul class="speaker-list">
- <?php
- $speakers = get_sub_field('speakers');
- if ($speakers) :
- foreach ($speakers as $speaker) :
- $label = '';
- $mod = get_field('moderator', $speaker->ID);
- $intr = get_field('intro_speaker', $speaker->ID);
- if ($mod == true) :
- $label = ' <span style="color:' . get_field('primary_branding_color', 'options') . '">(moderator)</span>';
- endif;
- if ($intr == true) :
- $label = ' <span style="color: #35a6c4">(introduction)</span>';
- endif;
- ?>
- <li>
- <a class='iframe' href="<?php echo get_permalink($speaker->ID); ?>"><?php echo get_the_title($speaker->ID); ?></a><?php echo $label; ?>
- <?php the_field('job_title', $speaker->ID); ?>
- </li>
- <?php
- endforeach;
- endif; ?>
- </ul>
- <?php
- $c++;
- endwhile;
- endif;
- ?>
- </div>
- </li>
- <?php } endwhile; ?>
- </ul>
- </section>
Advertisement
Add Comment
Please, Sign In to add comment