function update
This commit is contained in:
parent
3a9adf85a9
commit
fe8d7511d0
|
@ -10,7 +10,9 @@ if (!function_exists('mep_ev_org')) {
|
||||||
global $post, $author_terms;
|
global $post, $author_terms;
|
||||||
ob_start();
|
ob_start();
|
||||||
if ($author_terms) {
|
if ($author_terms) {
|
||||||
|
$org = get_the_terms(get_the_id(), 'mep_org');
|
||||||
require(mep_template_file_path('single/organizer.php'));
|
require(mep_template_file_path('single/organizer.php'));
|
||||||
|
|
||||||
}
|
}
|
||||||
$content = ob_get_clean();
|
$content = ob_get_clean();
|
||||||
echo apply_filters('mage_event_single_org_name', $content, $post->ID);
|
echo apply_filters('mage_event_single_org_name', $content, $post->ID);
|
||||||
|
|
|
@ -1,6 +1,25 @@
|
||||||
<p>
|
<p>
|
||||||
<?php echo mep_get_option('mep_by_text', 'label_setting_sec') ? mep_get_option('mep_by_text', 'label_setting_sec') : esc_html__('By:','mage-eventpress'); ?>
|
<?php echo mep_get_option('mep_by_text', 'label_setting_sec') ? mep_get_option('mep_by_text', 'label_setting_sec') : esc_html__('By:','mage-eventpress'); ?>
|
||||||
|
<?php
|
||||||
|
$count_term = sizeof($org);
|
||||||
|
$count = 1;
|
||||||
|
if( $count_term > 1){
|
||||||
|
foreach ($org as $_org) {
|
||||||
|
?>
|
||||||
|
<a href="<?php echo get_term_link( $_org->term_id, 'mep_org' ); ?>">
|
||||||
|
<?php echo esc_html($_org->name); if($count_term == $count){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
echo ', ';
|
||||||
|
} ?>
|
||||||
|
</a><?php
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
?>
|
||||||
|
|
||||||
<a href="<?php echo get_term_link( $author_terms[0]->term_id, 'mep_org' ); ?>">
|
<a href="<?php echo get_term_link( $author_terms[0]->term_id, 'mep_org' ); ?>">
|
||||||
<?php echo esc_html($author_terms[0]->name); ?>
|
<?php echo esc_html($author_terms[0]->name); ?>
|
||||||
</a>
|
</a>
|
||||||
|
<?php } ?>
|
||||||
</p>
|
</p>
|
Loading…
Reference in New Issue