Exemplo n.º 1
0
            </div>
        </div>
        <?php 
if ($show_title == 1 || $show_description == "true" || $show_description == 1) {
    ?>

            <div class="cs-portfolio-content <?php 
    echo esc_attr($extra_class_1column);
    ?>
">
                <div class="cs-portfolio-content-inner">
                    <?php 
    if ($show_description == "true") {
        echo '<div class="cs-portfolio-description">';
        if ($excerpt_length != -1) {
            echo cshero_content_max_charlength(strip_shortcodes(get_the_content()), (int) $excerpt_length);
        } else {
            echo strip_shortcodes(get_the_content());
        }
        echo '</div>';
    }
    ?>

                </div>
            </div>
        <?php 
}
?>

    </article>
</div>
Exemplo n.º 2
0
                                            <?php 
    }
    ?>

                                            <?php 
    if ($show_description == true || $show_description == 1 || $read_more != '') {
        ?>

                                            <div class="cs-carousel-events-description">
                                                <?php 
        if ($show_description == true || $show_description == 1) {
            if ($excerpt_length != -1) {
                ?>

                                                    <p><?php 
                echo cshero_content_max_charlength(strip_tags($event->post_content), $excerpt_length);
                ?>
</p>
                                                <?php 
            } else {
                ?>

                                                    <p><?php 
                echo strip_tags($event->post_content);
                ?>
</p>
                                                <?php 
            }
        }
        ?>
Exemplo n.º 3
0
    ?>
</h2>
                                            </div>
                                        </div>
                                        <?php 
    if ($show_description == true || $show_description == 1 || $read_more != '') {
        ?>

                                        <div class="cs-carousel-post-description">
                                            <?php 
        if ($show_description == true || $show_description == 1) {
            if ($excerpt_length != -1) {
                ?>

                                                <p><?php 
                echo cshero_content_max_charlength(get_the_excerpt(), $excerpt_length);
                ?>
</p>
                                            <?php 
            } else {
                ?>

                                                <p><?php 
                the_content();
                ?>
</p>
                                            <?php 
            }
        }
        ?>
Exemplo n.º 4
0
function cs_covers_lider_render($params, $content = null)
{
    global $wpdb;
    extract(shortcode_atts(array('title' => '', 'source' => '', 'eventcategory' => '', 'menucategory' => '', 'items' => '3', 'class' => '', 'description' => ''), $params));
    wp_enqueue_script('coverslider', get_template_directory_uri() . '/framework/shortcodes/coverslider/coverslider.js', array(), '1.0.0');
    $args = array();
    switch ($source) {
        case 'latest_events':
            $args = array('posts_per_page' => $items, 'post_type' => 'event', 'post_status' => 'publish');
            if ($eventcategory) {
                $args['tax_query'] = array(array('taxonomy' => 'event-categories', 'field' => 'id', 'terms' => explode(',', $eventcategory)));
            }
            add_filter('posts_join', 'cms_event_query_join');
            add_filter('posts_where', 'cms_event_query_where');
            add_filter('posts_orderby', 'cms_event_query_orderby');
            break;
        case 'chefs_specials':
            $args = array('posts_per_page' => $items, 'meta_query' => array(array('key' => 'cs_menu_special', 'value' => 'yes', 'meta_compare' => '=')), 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'restaurantmenu', 'post_status' => 'publish');
            if ($menucategory) {
                $args['tax_query'] = array(array('taxonomy' => 'restaurantmenu_category', 'field' => 'id', 'terms' => explode(',', $menucategory)));
            }
            break;
    }
    if (isset($args)) {
        $the_query = new WP_Query($args);
        remove_filter('posts_join', 'cms_event_query_join');
        remove_filter('posts_where', 'cms_event_query_where');
        remove_filter('posts_orderby', 'cms_event_query_orderby');
    }
    ob_start();
    ?>
	<div class="feature-box-inner latest-events">
		<div class="cs-transformEvents Events <?php 
    echo esc_attr($class);
    ?>
">
			<div class="cs-eventHeader active">
				<h3 class="css-eventTitle"><?php 
    echo esc_attr($title);
    ?>
</h3>
				<div class="css-eventDes"><?php 
    echo esc_attr($description);
    ?>
</div>
			</div>
		</div>
		<div class="cs-latestEvents block1 <?php 
    echo esc_attr($class);
    ?>
">
			<div class="cs-eventBody">
			    <?php 
    if ($source != 'custom') {
        ?>
			        <?php 
        if (isset($the_query) && $the_query->have_posts()) {
            ?>
    				<ul class="cs-eventList">
    			        <?php 
            while ($the_query->have_posts()) {
                $the_query->the_post();
                ?>
    					<li class="table">
    						<div class="cs-eventImg table-cell">
    							<span><?php 
                the_post_thumbnail('thumbnail');
                ?>
</span>
    						</div>
    						<div class="cs-eventContent table-cell">
    							<h3><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a></h3>
    							<p><?php 
                echo cshero_content_max_charlength(strip_tags(get_the_content()), 60);
                ?>
</p>
    						</div>
    					</li>
    					<?php 
            }
            ?>
    				</ul>
    				<?php 
        }
        ?>
				<?php 
    } else {
        echo apply_filters('the_content', $content);
    }
    ?>
			</div>
		</div>
	</div>
	<?php 
    wp_reset_query();
    wp_reset_postdata();
    return ob_get_clean();
}