Ejemplo n.º 1
0
if (has_post_thumbnail()) {
    $item_string .= '

    <div class="component-element">
        <a href="' . get_permalink() . '" class="image-holder">
            <div class="grid">';
    if (!isset($cell_class)) {
        $cell_class = "";
    }
    if ($show_hover_effects == "No") {
        $image_string = thshpr_generate_image($width, $height, get_the_ID());
        $item_string .= $image_string;
    } else {
        $item_string .= '
                    <div class="effect-1">';
        $image_string = thshpr_generate_image($width, $height, get_the_ID());
        $item_string .= $image_string;
        $item_string .= '

                        <div class="item-1">
                            <div><span class="centered">' . $hover_top . '</span></div>
                        </div>
                        <div class="item-2">
                            <div><span class="centered">' . $hover_bottom . '</span></div>
                        </div>
                    </div>';
    }
    $item_string .= '

            </div>
        </a>
Ejemplo n.º 2
0
					<?php 
$args = array('cat' => $post_categories, 'posts_per_page' => 100, 'orderby' => $order_by);
/** WP Query **/
$the_query = new WP_Query($args);
$i = 1;
$item_string = "";
/** The Loop **/
if ($the_query->have_posts()) {
    while ($the_query->have_posts()) {
        $the_query->the_post();
        $item_string = "";
        //set it up for concat
        $hidden_thumb = "";
        if (has_post_thumbnail()) {
            $hidden_thumb = thshpr_generate_image(100, 100, get_the_ID());
        }
        if ($components_elements) {
            foreach ($components_elements as $key => $value) {
                /** Runs through user selected drag and drop component elements from shortcode options **/
                /** Include templates rather than functions due to WordPress loop variable scope **/
                switch ($value['opt_posts_block_rows']) {
                    case 'Thumbnail':
                        include locate_template('post-component-elements/image-string.php');
                        break;
                    case 'Title':
                        include locate_template('post-component-elements/title-posts-slider-string.php');
                        break;
                    case 'Title+Excerpt':
                        include locate_template('post-component-elements/title-excerpt-posts-slider-string.php');
                        break;