Пример #1
0
function imic_staff($atts, $content = null)
{
    extract(shortcode_atts(array("title" => "", "number" => "", "column" => 4), $atts));
    $output = '';
    if (is_plugin_active("imithemes-listing/listing.php")) {
        $args_team = array('post_type' => 'team', 'posts_per_page' => $number);
        $output .= '<hr class="fw">
                <div class="text-align-center"><h2 class="uppercase">' . $title . '</h2></div>
                <div class="spacer-20"></div>
            	<div class="row">
				<ul class="sort-destination gallery-grid" data-sort-id="gallery">';
        $team_listing = new WP_Query($args_team);
        if ($team_listing->have_posts()) {
            while ($team_listing->have_posts()) {
                $team_listing->the_post();
                $social = imic_social_staff_icon();
                $output .= '<li class="col-md-' . $column . ' col-sm-' . $column . ' grid-item format-image">
                        <div class="grid-item-inner">
                            <a data-toggle="modal" data-target="#team-modal-' . (get_the_ID() + 2648) . '" href="#" class="media-box"> ' . get_the_post_thumbnail(get_the_ID(), '600x400') . ' </a>
                            <div class="grid-content">
                                <h3 class="post-title"><a data-toggle="modal" data-target="#team-modal-' . (get_the_ID() + 2648) . '" href="#" class="">' . get_the_title() . '</a></h3><p>' . imic_excerpt(10) . '</p>' . $social . '</div>
                        </div>
                    </li>';
                $output .= '<div class="modal fade team-modal" id="team-modal-' . (get_the_ID() + 2648) . '" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                      <div class="modal-dialog modal-lg">
                        <div class="modal-content">
                          <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h4 class="modal-title" id="myModalLabel">' . __('Team Members', 'framework') . '</h4>
                          </div>
                            <div class="modal-body">
                                <div class="staff-item">
                                <div class="row">
                                    <div class="col-md-5 col-sm-6">
                                    	' . get_the_post_thumbnail(get_the_ID(), '600x400', array('class' => 'img-thumbnail')) . '
                                    </div>
                                    <div class="col-md-7 col-sm-6">
                                    	<h3>' . get_the_title() . '</h3>';
                $post_id = get_post(get_the_ID());
                $content = $post_id->post_content;
                $content = apply_filters('the_content', $content);
                $content = str_replace(']]>', ']]>', $content);
                $output .= $content;
                $output .= '</div>
                                </div>
                            </div>
                            </div>
                        </div>
                      </div>
                    </div>';
            }
        }
        $output .= '</ul></div>';
        wp_reset_postdata();
    }
    return $output;
}
Пример #2
0
function imic_staff($atts, $content = null)
{
    extract(shortcode_atts(array("number" => "", "order" => "", "category" => "", "column" => "", "excerpt_length" => ""), $atts));
    $output = '';
    if ($order == "no") {
        $orderby = "ID";
        $sort_order = "DESC";
    } else {
        $orderby = "menu_order";
        $sort_order = "ASC";
    }
    if ($excerpt_length == '') {
        $excerpt_length = 30;
    }
    if ($column == 3) {
        $column = 4;
    } elseif ($column == 4) {
        $column = 3;
    } elseif ($column == 2) {
        $column = 6;
    } elseif ($column == 1) {
        $column = 12;
    } else {
        $column = 4;
    }
    query_posts(array('post_type' => 'staff', 'staff-category' => $category, 'posts_per_page' => $number, 'orderby' => $orderby, 'order' => $sort_order));
    if (have_posts()) {
        $output .= '<div class="row">';
        while (have_posts()) {
            the_post();
            $custom = get_post_custom(get_the_ID());
            $output .= '<div class="col-md-' . $column . ' col-sm-' . $column . '">
                    <div class="grid-item staff-item"> 
                        <div class="grid-item-inner">';
            if (has_post_thumbnail()) {
                $output .= '<div class="media-box"><a href="' . get_permalink(get_the_ID()) . '">';
                $output .= get_the_post_thumbnail(get_the_ID(), 'full');
                $output .= '</a></div>';
            }
            $job_title = get_post_meta(get_the_ID(), 'imic_staff_job_title', true);
            $job = '';
            if (!empty($job_title)) {
                $job = '<div class="meta-data">' . $job_title . '</div>';
            }
            $output .= '<div class="grid-content">
                                <h3> <a href="' . get_permalink(get_the_ID()) . '">' . get_the_title() . '</a></h3>';
            $output .= $job;
            $output .= imic_social_staff_icon();
            $excerpt_length;
            $description = imic_excerpt($excerpt_length);
            if ($excerpt_length != 0) {
                if (!empty($description)) {
                    $output .= $description;
                }
            }
            global $imic_options;
            if ($excerpt_length != 0) {
                $staff_read_more_text = $imic_options['staff_read_more_text'];
                if ($imic_options['switch_staff_read_more'] == 1 && $imic_options['staff_read_more'] == '0') {
                    $output .= '<p><a href="' . get_permalink() . '" class="btn btn-default">' . $staff_read_more_text . '</a></p>';
                } elseif ($imic_options['switch_staff_read_more'] == 1 && $imic_options['staff_read_more'] == '1') {
                    $output .= '<p><a href="' . get_permalink() . '">' . $staff_read_more_text . '</a></p>';
                }
            }
            $output .= '</div></div>
                    </div>
                </div>';
        }
        $output .= '</div>';
    }
    wp_reset_query();
    return $output;
}
Пример #3
0
        echo '<div class="col-md-' . $grid_column . ' col-sm-6">
	<div class="grid-item staff-item"> 
    	<div class="grid-item-inner format-standard">';
        if (has_post_thumbnail()) {
            echo '<a href="' . get_permalink(get_the_ID()) . '" class="media-box">
                	' . get_the_post_thumbnail(get_the_ID(), 'full') . '';
            echo '</a>';
        }
        echo '<div class="grid-content">
              	<h3> <a href="' . get_permalink(get_the_ID()) . '">' . get_the_title() . '</a></h3>';
        if ($instance['show_post_meta']) {
            $job_title = get_post_meta(get_the_ID(), 'imic_staff_job_title', true);
            if (!empty($job_title)) {
                echo '<div class="meta-data">' . $job_title . '</div>';
            }
            echo imic_social_staff_icon();
        }
        if ($excerpt_length != "") {
            echo '<div class="page-content">';
            echo imic_excerpt($excerpt_length);
            echo '</div>';
        }
        if ($read_more_text != "") {
            echo '<p><a href="' . get_permalink() . '" class="btn btn-primary">' . $read_more_text . '</a></p>';
        }
        echo '</div></div></div></div>';
    }
    ?>
</div>
<?php 
}
Пример #4
0
function imic_staff($atts, $content = null)
{
    extract(shortcode_atts(array("title" => "", "type" => 1, "order" => "", "number" => "", "column" => 4, "cat" => ""), $atts));
    $output = '';
    if ($order == "no") {
        $orderby = "ID";
        $sort_order = "DESC";
    } else {
        $orderby = "menu_order";
        $sort_order = "ASC";
    }
    $url = imic_get_template_url('template-speakers-sermon.php');
    query_posts(array('post_type' => 'speaker', 'speaker-category' => $cat, 'posts_per_page' => $number, 'orderby' => $orderby, 'order' => $sort_order));
    $output .= '<h3>' . $title . '</h3>
              	<hr class="sm">';
    if ($type == 1) {
        $output .= '<div class="row">';
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                $staff_position = get_post_meta(get_the_ID(), 'imic_staff_position', true);
                $social = imic_social_staff_icon();
                $output .= '<div class="col-md-' . $column . ' col-sm-6">
                      	<div class="grid-item staff-item format-standard">
                        	<div class="grid-item-inner">
                                ' . get_the_post_thumbnail(get_the_ID(), '600x400') . '
                          		<div class="grid-content">
                                	<div class="staff-item-name">
                            			<h5><a data-toggle="modal" data-target="#team-modal-' . (get_the_ID() + 2648) . '" href="#" class="">' . get_the_title() . '</a></h5>
                                        <span class="meta-data">' . $staff_position . '</span>
                                    </div>
                                    ' . $social . imic_excerpt(10) . '
                          		</div></div>
                        	</div>
                      	</div>';
                $output .= '<div class="modal fade team-modal" id="team-modal-' . (get_the_ID() + 2648) . '" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                      <div class="modal-dialog modal-lg">
                        <div class="modal-content">
                          <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h4 class="modal-title" id="myModalLabel">' . __('Team Members', 'framework') . '</h4>
                          </div>
                            <div class="modal-body">
                                <div class="staff-item">
                                <div class="row">
                                    <div class="col-md-5 col-sm-6">
                                    	' . get_the_post_thumbnail(get_the_ID(), '600x400', array('class' => 'img-thumbnail')) . '
                                    </div>
                                    <div class="col-md-7 col-sm-6">
                                    	<h3>' . get_the_title() . '</h3>
                                    	<span class="meta-data">' . get_post_meta(get_the_ID(), 'imic_staff_position', true) . '</span>';
                $post_id = get_post(get_the_ID());
                $content = $post_id->post_content;
                $content = apply_filters('the_content', $content);
                $content = str_replace(']]>', ']]>', $content);
                $output .= $content;
                if (get_post_meta(get_the_ID(), 'imic_display_sermon_url', true) == 1) {
                    if ($url != '') {
                        $output .= '<a class="btn btn-primary" href="' . add_query_arg('speakers', get_the_ID(), $url) . '">' . __('View all Sermons', 'framework') . '</a>';
                    }
                }
                $output .= '</div>
                                </div>
                            </div>
                            </div>
                        </div>
                      </div>
                    </div>';
            }
        }
        $output .= '</div>';
    } else {
        $output .= '<ul class="members-list row">';
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                $staff_position = get_post_meta(get_the_ID(), 'imic_staff_position', true);
                $social = imic_social_staff_icon();
                $output .= '<li class="col-md-' . $column . ' col-sm-4 col-xs-6">
                        ' . get_the_post_thumbnail(get_the_ID(), '100x100') . '
                        <h5>' . get_the_title() . '</h5>
                        <span class="meta-data">' . $staff_position . '</span>
                        ' . $social . '
                    </li>';
            }
        }
        $output .= '</ul>';
    }
    wp_reset_query();
    return $output;
}
Пример #5
0
                    $post_author_id = get_post_field('post_author', get_the_ID());
                    echo esc_url(get_author_posts_url($post_author_id));
                    ?>
"><?php 
                    echo esc_attr(get_the_author_meta('display_name', $post_author_id));
                    ?>
</a><?php 
                    _e(' on ', 'framework');
                    echo esc_attr(get_the_date(get_option('date_format')));
                    _e(' in ', 'framework');
                    the_category(', ');
                } elseif ($recent_post_type == 'product') {
                    echo '<span class="price">' . $product->get_price_html() . ' </span> ';
                    do_action('woocommerce_after_shop_loop_item');
                } else {
                    echo '<span class="meta-data">' . get_post_meta(get_the_ID(), 'imic_staff_position', true) . ' ' . imic_social_staff_icon() . '</span>';
                }
                ?>
</div>
                                                    <?php 
                if (in_array('text', $post_options)) {
                    if ($post_content == 'excerpt') {
                        echo imic_excerpt($post_excerpt_length);
                    } else {
                        the_content();
                    }
                }
                if (in_array('more', $post_options)) {
                    ?>
                                    <p><a href="<?php 
                    the_permalink();
Пример #6
0
            <?php 
}
while (have_posts()) {
    the_post();
    echo '<div class="page-content">';
    the_content();
    echo '</div>';
}
$job_title = get_post_meta(get_the_ID(), 'imic_staff_job_title', true);
$job = '';
if (!empty($job_title)) {
    $job = '<div class="meta-data">' . __('Position', 'framework') . ': ' . $job_title . '</div>';
}
$output = '';
$output .= $job;
$output .= imic_social_staff_icon();
echo $output;
?>
	
            </article>
        </div>
        <?php 
if (!empty($pageOptions['sidebar'])) {
    ?>
        <!-- Start Sidebar -->
        <div class="col-md-3 sidebar" id="sidebar-col">
            <?php 
    dynamic_sidebar($pageOptions['sidebar']);
    ?>
        </div>
        <!-- End Sidebar -->