PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
webnus-core
/
shortcodes
<?php function webnus_speakers( $attributes, $content = null ) { extract(shortcode_atts( array( 'hide' => '', 'shortcodeclass' => '', 'shortcodeid' => '', ), $attributes)); ob_start(); $shortcodeclass = $shortcodeclass ? $shortcodeclass : ''; $shortcodeid = $shortcodeid ? ' id="' . $shortcodeid . '"' : ''; echo '<div class="container sermons-speakers ' . $shortcodeclass . '" ' . $shortcodeid . '>'; $tax = 'sermon_speaker'; $hide_empty = ($hide)?true:false; $terms = get_terms( $tax, array('hide_empty' => $hide_empty,)); $speaker_counter = 0; foreach( $terms as $term ) { if ($speaker_counter == 0){ echo '<div class="row">'; } $speaker_counter++; $sermons_count = $term->count; $speaker_detail = term_description( $term->term_id, $tax ); if ( $sermons_count > 1 ) { $w_sermons_count = '<a href="'. get_term_link( $term ) .'">'. str_replace( '%', number_format_i18n( $sermons_count ), __( '% Sermons', 'deep' )) .'</a>'; } elseif ( $sermons_count == 0 ) { $w_sermons_count = __( 'No Sermons', 'deep' ); } else { $w_sermons_count = '<a href="'. get_term_link( $term ) .'">'. __( '1 Sermon', 'deep' ) .'</a>'; } echo '<div class="col-md-4"><article class="speaker">'; if (function_exists('z_taxonomy_image_url') ){ echo '<figure><img width="80" src="' . z_taxonomy_image_url($term->term_id,array(300, 300), TRUE) . '"></figure>'; } echo '<h2>'. $term->name .'</h2><h5>'. $w_sermons_count .'</h5>'. $speaker_detail .'</article></div>'; if ($speaker_counter == 3){ echo '</div>'; $speaker_counter = 0; } } if ($speaker_counter != 0){ // if row not full echo '</div>'; //close row } echo '</div>'; $out = ob_get_contents(); ob_end_clean(); wp_reset_postdata(); return $out; } add_shortcode('speakers', 'webnus_speakers'); ?>
[+]
..
[-] video-teaser.php
[edit]
[-] vcw.php
[edit]
[-] sermon-category.php
[edit]
[-] iconbox.php
[edit]
[-] speakers.php
[edit]
[-] iconfonts-param.php
[edit]
[-] checklist-param.php
[edit]
[-] infobox.php
[edit]
[-] webtags.php
[edit]
[-] teaser-box.php
[edit]
[-] latest-from-blog.php
[edit]
[-] reservation.php
[edit]
[-] subscribe.php
[edit]
[-] progressbar.php
[edit]
[-] review-items.php
[edit]
[-] icon-divider.php
[edit]
[-] toggle-box.php
[edit]
[+]
assets
[-] pie.php
[edit]
[-] asermon.php
[edit]
[-] buttons.php
[edit]
[-] accordion.php
[edit]
[-] testimonial-carousel.php
[edit]
[-] deep-gallery.php
[edit]
[-] custom-menu.php
[edit]
[-] postslider.php
[edit]
[-] magazine.php
[edit]
[-] callout.php
[edit]
[-] maxcounter.php
[edit]
[-] testimonialslider.php
[edit]
[-] testimonials.php
[edit]
[-] wp-hotel-booking.php
[edit]
[-] services.php
[edit]
[-] image-carousel.php
[edit]
[-] category-tab.php
[edit]
[-] slide-up-note.php
[edit]
[-] ourteam.php
[edit]
[-] prayerwall-items.php
[edit]
[-] heading.php
[edit]
[-] tablepress.php
[edit]
[-] instagram.php
[edit]
[-] video-play.php
[edit]
[-] columns.php
[edit]
[-] special-offer.php
[edit]
[-] like-view-share.php
[edit]
[-] image-hotspot.php
[edit]
[-] postfromblog.php
[edit]
[-] roadmap.php
[edit]
[-] search.php
[edit]
[-] recipes.php
[edit]
[-] ourclients.php
[edit]
[-] tab.php
[edit]
[-] blog.php
[edit]
[-] icon.php
[edit]
[-] latest-tweets.php
[edit]
[-] before-after-image.php
[edit]
[-] food-menu.php
[edit]
[-] alerts.php
[edit]
[-] login.php
[edit]
[-] pricing-plan.php
[edit]
[-] dropcap.php
[edit]
[-] rooms.php
[edit]
[-] prayerwall-form.php
[edit]
[-] countdown.php
[edit]
[-] lefttab.php
[edit]
[-] schedule.php
[edit]
[-] block-quote.php
[edit]
[-] highlight.php
[edit]
[-] our-process.php
[edit]
[-] w-title.php
[edit]
[-] shop-products.php
[edit]
[-] buy-process.php
[edit]
[-] portfolio-carousel.php
[edit]
[-] causes.php
[edit]
[-] review-form.php
[edit]
[-] pricingtables.php
[edit]
[-] sermons.php
[edit]
[-] distance.php
[edit]
[-] collection.php
[edit]
[-] donate.php
[edit]
[-] googlemap.php
[edit]
[-] list.php
[edit]
[-] acause.php
[edit]
[-] service-carousel.php
[edit]
[-] quote.php
[edit]
[-] w-svg.php
[edit]
[-] tooltip.php
[edit]
[-] socials.php
[edit]
[-] process-carousel.php
[edit]