public function rewind_media()
 {
     parent::rewind_posts();
 }
Exemplo n.º 2
0
function placeTabboxContents($tb_query_args)
{
    //Filters are added (and later removed) to change the output of The Loop function calls.
    $tb_query = new WP_Query($tb_query_args);
    $output;
    //START CONTENT OUTPUT
    $output .= '
		<div class="tb-selector-bar">';
    //Add selector bar title filter.
    add_filter('the_title', 'tb_title');
    if ($tb_query->have_posts()) {
        while ($tb_query->have_posts()) {
            $tb_query->the_post();
            $output .= get_the_title($tb_query->post->ID);
        }
    }
    $output .= '
		</div>';
    //Remove selector bar title filter.
    remove_filter('the_title', 'tb_title');
    //Add filters for actual content
    add_filter('the_title', 'tbc_title');
    add_filter('the_content', 'tb_content');
    add_filter('post_thumbnail_html', 'tb_thumbnail');
    $tb_query->rewind_posts();
    if ($tb_query->have_posts()) {
        while ($tb_query->have_posts()) {
            $tb_query->the_post();
            global $more;
            $more = 0;
            $output .= '
			<div class="tb-content">';
            $output .= get_the_title($tb_query->post->ID);
            get_the_post_thumbnail($tb_query->post->ID, array(250, 250));
            $content = get_the_content('<span class="readmore">Read More &raquo;</span>');
            $content = apply_filters('the_content', $content);
            $output .= str_replace(']]>', ']]&gt;', $content);
            $output .= '
			</div>';
        }
    }
    //END CONTENT OUTPUT
    //Then the filters are removed so they don't change other posts.
    remove_filter('the_title', 'tbc_title');
    remove_filter('the_content', 'tb_content');
    remove_filter('post_thumbnail_html', 'tb_thumbnail');
    return $output;
}
Exemplo n.º 3
0
         */
        if ($featured->post_count > 1) {
            wp_enqueue_script('forever-slider', get_template_directory_uri() . '/js/slider.js', array('jquery'), '13-12-2012');
            ?>

					<nav id="feature-slider">
						<ul>
						<?php 
            /**
             * Reset the counter so that we end up with matching elements
             */
            $post_counter = 0;
            /**
             * Begin from zero
             */
            $featured->rewind_posts();
            /**
             * Let's roll, again.
             */
            while ($featured->have_posts()) {
                $featured->the_post();
                /**
                 * Make sure we don't see any posts without thumbnails
                 */
                if (get_the_post_thumbnail()) {
                    $post_counter++;
                    if (1 == $post_counter) {
                        $class = 'class="active"';
                    } else {
                        $class = '';
                    }
Exemplo n.º 4
0
			
			<?php 
        }
        ?>
		
		<?php 
    }
    ?>
	
	<?php 
}
?>
</section>

<?php 
$slides_query->rewind_posts();
?>

<?php 
if ($slides_query->have_posts()) {
    ?>

	<?php 
    while ($slides_query->have_posts()) {
        $slides_query->the_post();
        ?>
	
		<?php 
        if (get_field('display') !== 'slider') {
            ?>
		
Exemplo n.º 5
0
    function getItems($numberOfListings, $text)
    {
        //html
        global $post;
        add_image_size('slider_widget_size', 510, 300, false);
        $listings = new WP_Query();
        $listings->query('post_type=' . $this->post_type . '&posts_per_page=' . $numberOfListings);
        if ($listings->found_posts > 0) {
            ?>
		<div class="row">
			<div class="col-md-7">
				<div id="carousel" class="carousel slide" data-ride="carousel">
				<ol class="carousel-indicators">
<?php 
            while ($listings->have_posts()) {
                $listings->the_post();
                ?>
<li data-target="#carousel" data-slide-to="<?php 
                echo $listings->current_post;
                ?>
" <?php 
                if ($listings->current_post == 0 && !is_paged()) {
                    echo "class=\"active\"";
                }
                ?>
></li>
<?php 
            }
            $listings->rewind_posts();
            ?>
				</ol>
				<div class="carousel-inner">
<?php 
            while ($listings->have_posts()) {
                $listings->the_post();
                ?>
				<div class="item<?php 
                if ($listings->current_post == 0 && !is_paged()) {
                    echo " active";
                }
                ?>
">
					<?php 
                the_post_thumbnail('slider_widget_size');
                ?>
				</div>
<?php 
            }
            wp_reset_postdata();
            ?>
				</div>
				</div>
			</div>
		   <div class="col-md-5">
				<section>
					<p>
<?php 
            echo $text;
            ?>
					</p>
				</section>
			</div>
		</div>
<?php 
        } else {
            echo '<p style="padding:25px;">No listing found</p>';
        }
    }
Exemplo n.º 6
0
function get_latest_news($ignore = array(), $max_categories = 3, $max_news_per_category = 3)
{
    $categories = array();
    $ignoreCat = $ignore;
    $allCategories = get_categories();
    if (count($allCategories) < $max_categories) {
        $max_categories = count($allCategories);
    }
    while (count($categories) < $max_categories) {
        list($categories, $ignoreCat) = get_latest_categories($ignoreCat);
    }
    $categories = array_slice($categories, 0, $max_categories);
    foreach ($categories as $category) {
        $args = array('posts_per_page' => $max_news_per_category, 'cat' => $category, 'post__not_in' => $ignore);
        $query = new WP_Query($args);
        while ($query->have_posts()) {
            $query->the_post();
            $ignore[] = get_the_ID();
        }
        $query->rewind_posts();
        $news[$category] = $query;
    }
    return $news;
}
Exemplo n.º 7
0
					<?php 
            echo get_the_post_thumbnail(get_the_ID(), 'slide');
            ?>
					<?php 
            if (!empty($destination)) {
                echo '</a>';
            }
            ?>
				<?php 
        }
    }
    ?>
			</div>
			
			<?php 
    $slides->rewind_posts();
    ?>
		
			<div class="indicators-wrapper">
				<ul class="indicators">
					<?php 
    while ($slides->have_posts()) {
        $slides->the_post();
        if (has_post_thumbnail()) {
            ?>
					<li class="indicator <?php 
            if ($slides->current_post == 0) {
                echo 'active';
            }
            ?>
 indicator-group-<?php 
Exemplo n.º 8
0
}
$hide_title = false;
if (isset($suffusion_cpt_post_id)) {
    $page_title = get_the_title($suffusion_cpt_post_id);
    $hide_title = suffusion_get_post_meta($suffusion_cpt_post_id, 'suf_hide_page_title', true);
}
if ($suf_excerpt_list_count == 'all' && !$page_of_posts) {
    $query_args = $wp_query->query;
    $query_args['posts_per_page'] = -1;
    $wp_query = new WP_Query($query_args);
} else {
    if ($page_of_posts) {
        query_posts('posts_per_page=-1');
    } else {
        // Not resetting the query_posts results skips the first entry
        $wp_query->rewind_posts();
    }
}
if (have_posts()) {
    $suffusion_current_post_index = 0;
    $suffusion_full_post_count_for_view = suffusion_get_full_content_count();
    $total = $wp_query->post_count - $suffusion_full_post_count_for_view;
    if ($suffusion_full_post_count_for_view > 0) {
        suffusion_after_begin_content();
    }
    while (have_posts()) {
        $suffusion_current_post_index++;
        if ($suffusion_current_post_index > $suffusion_full_post_count_for_view) {
            break;
        }
        the_post();
Exemplo n.º 9
0
    function widget($args, $instance)
    {
        $cache = array();
        if (!$this->is_preview()) {
            $cache = wp_cache_get('widget_recent_videos', 'extra');
        }
        if (!is_array($cache)) {
            $cache = array();
        }
        if (!isset($args['widget_id'])) {
            $args['widget_id'] = $this->id;
        }
        if (isset($cache[$args['widget_id']])) {
            echo $cache[$args['widget_id']];
            return;
        }
        ob_start();
        extract($args);
        $title = !empty($instance['title']) ? $instance['title'] : __('Recent Videos', 'extra');
        /** This filter is documented in wp-includes/default-widgets.php */
        $title = apply_filters('widget_title', $title, $instance, $this->id_base);
        $number = !empty($instance['number']) ? absint($instance['number']) : 5;
        if (!$number) {
            $number = 5;
        }
        $recent_video_posts = new WP_Query(apply_filters('widget_recent_videos_args', array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'tax_query' => array(array('taxonomy' => ET_POST_FORMAT, 'field' => 'slug', 'terms' => ET_POST_FORMAT_PREFIX . 'video')))));
        if ($recent_video_posts->have_posts()) {
            ?>
		<?php 
            echo $before_widget;
            ?>
		<?php 
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            ?>
		<div class="widget_video_wrapper">
			<img src="<?php 
            echo esc_url(get_template_directory_uri());
            ?>
/images/pagination-loading.gif" alt="<?php 
            _e('Loading...', 'extra');
            ?>
" class="widget_video_loading">
		</div><!-- .widget_video_wrapper -->
		<div class="widget_content">
			<?php 
            while ($recent_video_posts->have_posts()) {
                $recent_video_posts->the_post();
                ?>
				<script type="text/template" class="widget-video-item widget-video-item-<?php 
                echo esc_attr(get_the_ID());
                ?>
">
					<?php 
                $video_urls = get_post_meta(get_the_ID(), '_video_format_urls', true);
                if (!empty($video_urls)) {
                    $video_embed = extra_get_video_embed($video_urls);
                    echo $video_embed;
                    // Display cover image
                    if (has_post_thumbnail() && $video_embed) {
                        $thumbnail_id = get_post_thumbnail_id();
                        $thumbnail_src = wp_get_attachment_image_src($thumbnail_id, extra_get_column_thumbnail_size());
                        if (isset($thumbnail_src[0])) {
                            ?>
							<div class="video-overlay" style="background-image: url(<?php 
                            esc_attr_e($thumbnail_src[0]);
                            ?>
);">
								<div class="video-overlay-hover">
									<a href="#" class="video-play-button"></a>
								</div>
							</div>
							<?php 
                        }
                    }
                }
                ?>
				</script><!-- .widget-video-item -->
			<?php 
            }
            ?>
			<script type="text/template" class="widget-video-item widget-video-item-empty">
				<h4 class="no-video-title"><?php 
            _e('No Video Found');
            ?>
</h4>
			</script>
		</div><!-- .widget_content -->
		<?php 
            $recent_video_posts->rewind_posts();
            ?>
		<ul class="widget_list">
		<?php 
            while ($recent_video_posts->have_posts()) {
                $recent_video_posts->the_post();
                ?>
			<li>
				<?php 
                $color = extra_get_post_category_color();
                $post_format = et_get_post_format();
                ?>
					<a href="<?php 
                the_permalink();
                ?>
" data-video-id="<?php 
                echo esc_attr(get_the_ID());
                ?>
" class="title"><?php 
                get_the_title() ? the_title() : the_ID();
                ?>
</a>
			</li>
		<?php 
            }
            ?>
		<?php 
            wp_reset_postdata();
            ?>
		</ul>
		<?php 
            echo $after_widget;
            ?>
		<?php 
            // Reset the global $the_post as this query will have stomped on it
            wp_reset_postdata();
        }
        if (!$this->is_preview()) {
            $cache[$args['widget_id']] = ob_get_flush();
            wp_cache_set('et_widget_recent_videos', $cache, 'extra');
        } else {
            ob_end_flush();
        }
    }
    /**
     * Display FAQs in list style
     *
     * @since   1.0.0
     * @param   Array   $filter_array   Array of faq groups slugs
     */
    private function list_all_faqs($filter_array)
    {
        $faqs_query_args = array('post_type' => 'faq', 'posts_per_page' => -1);
        if (!empty($filter_array)) {
            $faqs_query_args['tax_query'] = array(array('taxonomy' => 'faq-group', 'field' => 'slug', 'terms' => $filter_array));
        }
        $faqs_query = new WP_Query($faqs_query_args);
        // FAQs index
        if ($faqs_query->have_posts()) {
            echo '<div id="qe-faqs-index" class="qe-faqs-index">';
            echo '<ol class="qe-faqs-index-list">';
            while ($faqs_query->have_posts()) {
                $faqs_query->the_post();
                ?>
<li><a href="#qe-faq-<?php 
                the_ID();
                ?>
"><?php 
                the_title();
                ?>
</a></li><?php 
            }
            echo '</ol>';
            echo '</div>';
        }
        // rewind faqs loop
        $faqs_query->rewind_posts();
        // FAQs Contents
        if ($faqs_query->have_posts()) {
            while ($faqs_query->have_posts()) {
                $faqs_query->the_post();
                ?>
                <div id="qe-faq-<?php 
                the_ID();
                ?>
" class="qe-faq-content">
                    <h4><i class="fa fa-question-circle"></i> <?php 
                the_title();
                ?>
</h4>
                    <?php 
                the_content();
                ?>
                    <a class="qe-faq-top" href="#qe-faqs-index"><i class="fa fa-angle-up"></i> <?php 
                _e('Back to Index', 'quick-and-easy-faqs');
                ?>
</a>
                </div>
            <?php 
            }
        }
        // All the custom loops ends here so reset the query
        wp_reset_query();
    }
function tdr_top_choices_table($args)
{
    $defaults = array('number_to_show' => 3, 'number_to_query' => 3, 'offer_cat_terms' => get_terms('offer-category', array('fields' => 'ids')), 'rank_meta_key' => '');
    $args = wp_parse_args($args, $defaults);
    extract($args, EXTR_SKIP);
    /* Set up the Query */
    /* Taxonomy for the Query
     * ***************************************************************/
    // Set up the taxonomy
    $offer_cat_args = array(array('taxonomy' => 'offer-category', 'field' => 'id', 'terms' => $offer_cat_terms));
    /* Create the query 
     * ***************************************************************/
    $basic_query = new WP_Query(array('tax_query' => $offer_cat_args, 'post_type' => 'tdr_product', 'posts_per_page' => (int) $number_to_query, 'order' => 'ASC', 'orderby' => 'meta_value_num', 'meta_key' => 'thunder_plugin_products_rank'));
    // If a Rank Key is defined, reorder the Products
    if (!empty($rank_meta_key)) {
        global $tdr_rank_key;
        $tdr_rank_key = $rank_meta_key;
        usort(&$basic_query->{'posts'}, 'tdr_sort_by_offer_category_rank');
        $basic_query->rewind_posts();
    }
    // Update to only show the $number_to_show
    $basic_query->post_count = $number_to_show;
    $returner = '<div class="row">';
    $returner .= '<div class="span">';
    // Set up tdr_product
    $product = new Thunder_Plugin_Products();
    while ($basic_query->have_posts()) {
        $basic_query->the_post();
        // Get the ID for the Rating Bar, this determines how the stars appear
        $internal_rating = floatval($product->get_the_internal_rating());
        if ($internal_rating < 2.2) {
            $internal_rating_id = 'two_zero';
        } elseif ($internal_rating < 2.7) {
            $internal_rating_id = 'two_five';
        } elseif ($internal_rating < 3.2) {
            $internal_rating_id = 'three_zero';
        } elseif ($internal_rating < 3.7) {
            $internal_rating_id = 'three_five';
        } elseif ($internal_rating < 4.2) {
            $internal_rating_id = 'four_zero';
        } elseif ($internal_rating < 4.7) {
            $internal_rating_id = 'four_five';
        } elseif ($internal_rating >= 4.7) {
            $internal_rating_id = 'five_zero';
        } else {
            $internal_rating_id = $internal_rating;
        }
        // Force display of non-significant digits for the internal rating
        $internal_rating = sprintf("%1.1f", $internal_rating);
        // Output a row for this Product, and get its name
        $returner .= '<div class="row"><div class="span4" style="border-top: 1px solid #eee; padding: 10px 0;">';
        $product_name = $product->get_the_affiliate_name();
        // Get the logo, and set up link
        add_image_size('our_top_choices_thumb', 120, 30);
        $review_link = get_permalink();
        $attr['alt'] = $product_name . ' Reviews';
        $attr['title'] = $product_name . ' Reviews';
        if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail('tdr_product', 'thumbnail-affiliate-logo')) {
            $affiliate_img = MultiPostThumbnails::get_the_post_thumbnail('tdr_product', 'thumbnail-affiliate-logo', NULL, 'our_top_choices_thumb', $attr);
        }
        $returner .= "<div class='our_top_logos'>";
        $returner .= "<a href='{$review_link}'>";
        $returner .= $affiliate_img;
        $returner .= '</a>';
        $returner .= "</div><!-- end .our_top_logos -->";
        $returner .= "<div class='our_top_ratings' style=''>";
        $returner .= "<div id='{$internal_rating_id}' class='rating-bar' style='position: relative; left: 5px;'></div>";
        $returner .= "<span style='font-size: 24px; font-weight: bold; line-height: 24px; '>{$internal_rating}</span>" . " <span class='review-link'>(<a href='{$review_link}' style=''>Review</a>)</span>";
        $returner .= "</div>";
        $returner .= "<div class='our_top_visit' style=''>";
        $product_id = $product->get_the_id();
        $jump_page_url = get_home_url() . "/visit?site={$product_id}&t=sidebar";
        $returner .= "<a target=_blank' href='{$jump_page_url}'><span style='font-size:10px;'>&#9654;</span> Visit Site</a>";
        $returner .= "</div>";
        $returner .= '</div><!-- end .span --></div><!-- end .row -->';
    }
    $returner .= "</div><!-- end .span -->";
    $returner .= "</div><!-- end .row -->";
    $returner .= '<div class="read_more_articles">';
    $offer_category_permalink = get_home_url() . '/reviews';
    $returner .= "<a href='{$offer_category_permalink}' id='review_page_link'>+ View All Reviews</a>";
    $returner .= '</div><!-- end .read_more_articles -->';
    return $returner;
}
Exemplo n.º 12
0
/**
 * Clears the buffer for content replacement on the Social Paper archive page.
 *
 * This is also where we call our custom directory template.
 *
 * @access private
 *
 * @param WP_Query $q
 */
function _cacsp_archive_ob_end($q)
{
    if (false === Social_Paper::$is_buffer) {
        return;
    }
    if (false === cacsp_is_archive()) {
        return;
    }
    ob_end_clean();
    remove_action('loop_end', '_cacsp_archive_ob_end', 999);
    // rewind posts if papers exist to display them in our template
    if (false === Social_Paper::$is_empty_archive) {
        $q->rewind_posts();
    }
    $templates = array();
    if (function_exists('buddypress')) {
        $templates[] = 'content-directory-social-paper-buddypress.php';
    }
    $templates[] = 'content-directory-social-paper.php';
    cacsp_locate_template($templates, true);
}
Exemplo n.º 13
0
    function wishlist_action_callback()
    {
        global $post, $user_ID;
        $opts = get_option('woocommerce_ignitewoo_wishlists_settings');
        if (!isset($opts['allow_guests'])) {
            $opts['allow_guests'] = 'no';
        }
        if ('yes' == $opts['allow_guests'] && !$user_ID && !isset($_COOKIE['wishlist_user_id'])) {
            ?>
				<div class="wishlist_notice">

					<div class="wishlist_notice_wrap">

						<?php 
            _e('Your browser is not accepting cookies', 'ignitewoo-wishlists-pro');
            ?>

						<div style="clear:both"></div>

						<div class="wishlist_login_register">

							<a href="<?php 
            echo $myaccount;
            ?>
">
								<?php 
            _e('You cannot use the wishlist feature', 'ignitewoo-wishlists-pro');
            ?>
							</a>

						</div>

					</div>

				</div>
			<?php 
        } else {
            if ('yes' != $opts['allow_guests'] && !$user_ID) {
                if (!$user_ID) {
                    $myaccount = woocommerce_get_page_id('myaccount');
                    $myaccount = get_permalink($myaccount);
                    ?>

				<div class="wishlist_notice">

					<div class="wishlist_notice_wrap">

						<?php 
                    _e('You must be logged in to use the wishlist feature', 'ignitewoo-wishlists-pro');
                    ?>

						<div style="clear:both"></div>

						<div class="wishlist_login_register">

							<a href="<?php 
                    echo $myaccount;
                    ?>
">
								<?php 
                    _e('Login or register', 'ignitewoo-wishlists-pro');
                    ?>
							</a>

						</div>

					</div>

				</div>

				<?php 
                    die;
                }
            }
        }
        if (!isset($_POST['nonce'])) {
            die('no');
        }
        if (!wp_verify_nonce($_POST['nonce'], 'wishlist_nonce')) {
            die('fail');
        }
        //echo 'hey: ' .  $_POST['user'] . ' ' .  $_POST['prod'];
        $wishlist_types = get_terms('c_wishlists_cat', '&hide_empty=0&order_by=id&order=asc');
        remove_all_filters('pre_get_posts');
        remove_all_filters('the_posts');
        remove_all_filters('wp');
        $args = array('post_type' => 'custom_wishlists', 'post_status' => 'publish', 'order_by' => 'ID', 'order' => 'ASC', 'showposts' => 9999, 'author' => absint($_POST['user']));
        $user_wishlists = new WP_Query($args);
        if (empty($_POST['qty'])) {
            $_POST['qty'] = 1;
        }
        ?>

		<h2 id="wishlist_title_bar" class="entry-title"><?php 
        _e('Wishlists', 'ignitewoo-wishlists-pro');
        ?>
</h2>

		<form id="wishslist_entry_form" action="<?php 
        admin_url('admin-ajax.php');
        ?>
" method="post" >

		<input type="hidden" name="action" value="wishlist_add_action">
		<input type="hidden" class="user" name="u" value="<?php 
        echo absint($_POST['user']);
        ?>
">
		<input type="hidden" class="prod" name="p" value="<?php 
        echo absint($_POST['prod']);
        ?>
">
		<input type="hidden" class="vid" name="v" value="<?php 
        echo absint($_POST['vid']);
        ?>
">
		<input type="hidden" class="vid" name="q" value="<?php 
        echo absint($_POST['qty']);
        ?>
">
		<ul>

		<?php 
        wp_nonce_field('add_to_wishlist');
        if ($user_wishlists->have_posts()) {
            echo '<li id="wishlist_existing_li">
				<h3 class="wishlist_h3_title" ><input class="wishlist_radio_toggle" checked="checked" type="radio" name="existing_or_new" value="1"> ' . __('Add Product to Existing Wishlist:', 'ignitewoo-wishlists-pro') . '</h3>
			    ';
            // NOTE TO THEMERS: This div "wishlists_list" ought to have CSS of overflow:auto; width: XXX; height: XXX
            echo '<div id="wishlists_list">
				<ul id="wishlist_existing_ul">';
            $i = 0;
            while ($user_wishlists->have_posts()) {
                $user_wishlists->the_post();
                $wishlist_type = wp_get_post_terms($post->ID, 'c_wishlists_cat', OBJECT);
                $i++;
                //if ( 1 == $i ) $checked = 'checked="checked"'; else $checked = '';
                $checked = '';
                echo '<li><label>
					<input ' . $checked . ' class="wishlist_radio_btn" type="radio" name="existing_wishlist" value="' . $post->ID . '">
				     ';
                the_title();
                if (isset($wishlist_type[0]->name)) {
                    echo ' (' . $wishlist_type[0]->name . ')
				      </label></li>';
                }
            }
            echo '</ul>
			    </div></li>';
        }
        if ($wishlist_types) {
            ?>

			<li id="wishlist_new_li">

				<h3 class="wishlist_h3_title">
					<?php 
            $user_wishlists->rewind_posts();
            if ($user_wishlists->have_posts()) {
                ?>
						<input class="wishlist_radio_toggle" type="radio" name="existing_or_new" value="2">

					<?php 
            }
            ?>

					<?php 
            _e('Add Product to New Wishlist', 'ignitewoo-wishlists-pro');
            ?>

				</h3>

				<div class="wishlist_new_wrap" style="display:none">
				  <div class="row">
					<?php 
            $field_wishlist_type_key = "field_575726e432f3c";
            $field_wishlist_type = get_field_object($field_wishlist_type_key);
            ?>
					<div class="col-md-12">   
					   <div class="form-group form-group-event-type"">
					   	 <?php 
            if ($field_wishlist_type) {
                ?>
					   		<label for="event-type">Event Type</label>
							<select name="event-type" id="event-type"s class="event-type">
								<option value="_none">- Select a value -</option>
							    <?php 
                foreach ($field_wishlist_type['choices'] as $k => $v) {
                    ?>
							    	<option value="<?php 
                    echo $k;
                    ?>
" <?php 
                    if ($event_type == $k) {
                        ?>
 selected <?php 
                    }
                    ?>
 ><?php 
                    echo $v;
                    ?>
</option>
							    <?php 
                }
                ?>
							</select>
						<?php 
            }
            ?>
					   </div>
						<!-- /input-group -->
					</div>

					<div class="col-md-12">   
					   <div class="form-group">
					     <label for="event-date">Event Date</label>
					     <input type="text" class="form-control" name="event-date" id="event-date" placeholder=""  value="">
					   </div>
						<!-- /input-group -->
					</div>

					<div class="col-md-12">   
					   <div class="form-group">
							<label class="wishlist_field_label"><?php 
            _e('Wishlist Title', 'ignitewoo-wishlists-pro');
            ?>
</label>
							<input id="wishlist_title_field" type="text" name="wishlist_title" value="" size="45"> 
					   </div>
						<!-- /input-group -->
					</div>

					<div class="col-md-12">   
					   <div class="form-group">
					     <label for="co-registrant-name">Co-Registrant Name</label>
					     <input type="text" class="form-control" name="co-registrant-name" id="co-registrant-name" placeholder="" value="">
					   </div>
						<!-- /input-group -->
					</div>

					<div class="col-md-12">   
					   <div class="form-group">
					     <label for="co-registrant-email">Co-Registrant Email</label>
					     <input type="email" class="form-control" name="co-registrant-email" id="co-registrant-email" placeholder="" value="">
					   </div>
						<!-- /input-group -->
					</div>

					<div class="col-md-12">   
					   <div class="form-group">
							<div class="wishlist_type_label">
								<?php 
            _e('Registry Type:', 'ignitewoo-wishlists-pro');
            ?>
</br>
							</div>
							<?php 
            $i = 0;
            ?>

							<?php 
            foreach ($wishlist_types as $w) {
                ?>
									<?php 
                if (!is_user_logged_in() && 'private' == strtolower($w->name)) {
                    continue;
                }
                ?>
	
								<?php 
                $i++;
                ?>

								<label class="wishlist_field_label wishlist_type_btn"><input type="radio" class="wishlist_radio_btn" name="wishlist_num" value="<?php 
                echo $w->term_id;
                ?>
" <?php 
                if (3 == $i) {
                    echo 'checked="checked"';
                }
                ?>
 > <?php 
                echo $w->name;
                ?>
 (<em><?php 
                echo $w->description;
                ?>
</em>)</label>

							<?php 
            }
            ?>
						</div>
						<!-- /input-group -->
					</div>
				  </div>
				</div>
			
				<button id="wishlist_add_button" class="button" type="button"><?php 
            _e('Submit', 'ignitewoo-wishlists-pro');
            ?>
</button>
				
				<?php 
            $user_wishlists->rewind_posts();
            if (!$user_wishlists->have_posts()) {
                ?>
					<script>
					jQuery( '.wishlist_new_wrap' ).css( 'display', 'block' );
					</script>
				<?php 
            }
            ?>

			</li>

			<?php 
        }
        echo '</ul>';
        echo '</form>';
        ?>
		
		<?php 
        die;
        // terminate now that ajax is complete
    }
Exemplo n.º 14
0
			<?php 
        }
        ?>
		
		<?php 
    }
    ?>
	
	<?php 
}
?>

</section>

<?php 
$blocks_query->rewind_posts();
?>

<?php 
if ($blocks_query->have_posts()) {
    ?>
	
	<?php 
    while ($blocks_query->have_posts()) {
        $blocks_query->the_post();
        ?>
		
		<?php 
        if (get_field('display') !== 'slider') {
            ?>
		
Exemplo n.º 15
0
//	global $wp_query;
//	$backuped_main_query = clone $wp_query;
$portfolio_query = new WP_Query($args);
if ($portfolio_query->have_posts()) {
    wp_enqueue_script('zero-portfolio-cat-1-js');
    $portfolioTagsArray = array();
    while ($portfolio_query->have_posts()) {
        $portfolio_query->the_post();
        $t = wp_get_post_terms(get_the_ID(), 'ff-portfolio-tag');
        if (!empty($t)) {
            foreach ($t as $onePortfolioTag) {
                $portfolioTagsArray[$onePortfolioTag->slug] = $onePortfolioTag;
            }
        }
    }
    $portfolio_query->rewind_posts();
    $pagePortfolioShowContent = strip_tags($pagePortfolioContent);
    $pagePortfolioShowContent = str_replace('&nbsp;', '', $pagePortfolioShowContent);
    $pagePortfolioShowContent = trim($pagePortfolioShowContent);
    $pagePortfolioShowContent = !empty($pagePortfolioShowContent);
    ?>
		<div class="portfolio-cat-1
			portfolio-cat-1--cols--xs--<?php 
    echo absint($column_count_xs);
    ?>
			portfolio-cat-1--show-description--xs--<?php 
    echo absint($show_description_xs);
    ?>

			portfolio-cat-1--cols--sm--<?php 
    echo absint($column_count_sm);
Exemplo n.º 16
0
 public function rewind_galleries()
 {
     parent::rewind_posts();
 }
Exemplo n.º 17
0
				<div id="webcomic-display-article" class="webcomic-display-article-wrapper">
				<?php 
        get_template_part('webcomic/content', get_post_type());
        ?>
				</div> <!-- webcomic-display-article -->
			<?php 
    }
    if (get_theme_mod('webcomic_front_page_transcripts', false)) {
        webcomic_transcripts_template();
    }
    if (get_theme_mod('webcomic_front_page_comments', false)) {
        $withcomments = true;
        comments_template();
        $withcomments = false;
    }
    $webcomics->rewind_posts();
}
?>
</div>
	
<div id="page" class="hfeed site">
	<div id="main" class="wrapper">
			
	<div id="primary" class="site-content">
		<div id="content" role="main">
		
		<?php 
if ($webcomics and get_theme_mod('webcomic_home_order', 'DESC') and $webcomics->have_posts()) {
    while ($webcomics->have_posts()) {
        $webcomics->the_post();
        if (get_theme_mod('webcomic_content', false)) {
Exemplo n.º 18
0
     $barcelona_q = new WP_Query($barcelona_q_params);
     $barcelona_async = false;
     $barcelona_mod_attr_data = array();
     if ($barcelona_mod['module_layout'] != 'f' || !is_single()) {
         $barcelona_mod_attr_data['type'] = $barcelona_mod['tab_type'] . '_' . $k;
     }
     if (in_array('has-tabs', $barcelona_mod_header_classes) && $barcelona_mod['tab_type'] != 't1') {
         $barcelona_mod_attr_data['post-not'] = implode(',', $barcelona_mod_posts);
     }
     if ($barcelona_q->have_posts()) {
         if ($barcelona_mod['tab_type'] != 't1') {
             while ($barcelona_q->have_posts()) {
                 $barcelona_q->the_post();
                 $barcelona_mod_posts[] = get_the_ID();
             }
             $barcelona_q->rewind_posts();
         }
     } else {
         $barcelona_mod['module_layout'] = 'none';
     }
     if ($barcelona_mod['module_layout'] == 'g') {
         if ($barcelona_mod['g_show_overlay_always'] == 'on') {
             $barcelona_show_overlay = true;
         }
         if ($barcelona_mod['g_is_autoplay'] == 'on') {
             $barcelona_is_autoplay = true;
         }
     }
 } else {
     $barcelona_content = $barcelona_mod['html'];
 }
Exemplo n.º 19
0
 public function rewind()
 {
     $this->_query->rewind_posts();
 }
Exemplo n.º 20
0
 /**
  * Splits the query into two columns based upon content length. Ported from base theme functions.
  *
  * @todo Move to compat
  * @param WP_Query $query
  * @param integer $post_cost A character cost attributed to rendering a post. Helps for approximations.
  * @param integer $min_chars The minimum number of characters per post. Helps for approximations.
  * @return Object The starting post ID of the second column.
  */
 public function wcb_optimal_column_split($query, $post_cost = 0, $min_chars = 0)
 {
     $query->rewind_posts();
     $total = 0;
     $totals = array();
     while ($query->have_posts()) {
         $post = $query->next_post();
         $length = strlen($post->post_content);
         $total += $length < $min_chars ? $min_chars : $length;
         $total += $post_cost;
         $totals[] = array($total, $post->ID);
     }
     $optimum = $total / 2;
     foreach ($totals as $arr) {
         list($current, $post_id) = $arr;
         // When the total starts increasing, we've found the beginning of the new column.
         if (isset($last) && abs($optimum - $last) < abs($optimum - $current)) {
             return $post_id;
         }
         $last = $current;
     }
 }
Exemplo n.º 21
0
 /**
  * (PHP 5 &gt;= 5.0.0)<br/>
  * Rewind the Iterator to the first element
  * @link http://php.net/manual/en/iterator.rewind.php
  * @return void Any returned value is ignored.
  */
 public function rewind()
 {
     wp_reset_postdata();
     $this->_query->rewind_posts();
     $this->_query->in_the_loop = false;
 }
Exemplo n.º 22
0
			<?php 
}
?>
	</div>
	<section id="projetContainer" class="taxProj filter-elements" data-taxonomy="<?php 
echo $tax;
?>
" data-term="<?php 
echo $term;
?>
">
	<?php 
$modDateRecent = 0;
$modDateDescription = 0;
$allposts->rewind_posts();
if ($allposts->have_posts()) {
    // The Loop
    while ($allposts->have_posts()) {
        $allposts->the_post();
        $modDatePost = get_the_modified_date('U');
        if ($modDateRecent < $modDatePost) {
            $modDateRecent = $modDatePost;
        }
        $featured = has_tag('featured');
        if ($featured == true) {
            $modDateDescription = get_the_modified_date('U');
            continue;
        }
        $ID = get_the_ID();
        $status = get_post_status();