$out .= '<a class="update btn blue small mr10" href="' . get_permalink($post->ID) . '" >' . $iva_booking_update . '</a>'; if ($iva_book_status != "confirmed" && $iva_book_status == "unconfirmed") { $out .= '<a class="confirm btn green small mr10" href="' . get_page_link($iva_templateid) . '/?email=' . urlencode($iva_book_email) . '&key=' . md5($iva_book_email) . '&action=confirm&id=' . get_the_id() . '">' . $iva_booking_confirm . '</a>'; } } if ($iva_book_status != "cancelled") { $out .= '<a class="cancel btn red small mr10" href="' . get_page_link($iva_templateid) . '/?email=' . urlencode($iva_book_email) . '&key=' . md5($iva_book_email) . '&action=cancel&id=' . get_the_id() . '" >' . $iva_booking_cancel . '</a>'; } else { $out .= '<span class="btn red small mr10">' . $iva_booking_cancelled . '</span>'; } $out .= '</td>'; $out .= '</tr></tbody>'; } if (function_exists('iva_pagination')) { $out .= '<tr><td colspan="6">'; $out .= iva_pagination(); $out .= '</td></tr>'; } wp_reset_query(); } $out .= '</table>'; echo $out; } ?> <div class="clear"></div> </div><!-- .entry-content-wrapper --> </main><!-- .content-area --> <div class="clear"></div> </div><!-- .inner --> </div><!-- .pagemid --> <?php
if (have_posts()) { while (have_posts()) { the_post(); ?> <?php get_template_part('content', get_post_format()); ?> <?php } ?> <?php if (function_exists('iva_pagination')) { echo iva_pagination(); } ?> <?php } else { ?> <p><?php _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'iva_theme_front'); ?> </p> <?php get_search_form(); ?>
function iva_offers_shortcode($atts) { extract(shortcode_atts(array('offers_postid' => '', 'offers_orderby' => 'title', 'offers_order' => 'ASC', 'offers_pagination' => '', 'offers_limits' => '1'), $atts)); global $post, $pagination, $atp_theme; $iva_ofr_btn_color = get_option('iva_ofr_btn_color') ? get_option('iva_ofr_btn_color') : __('blue', 'iva_theme_front'); $iva_ofr_btn_txt = get_option('iva_ofr_btn_txt') ? get_option('iva_ofr_btn_txt') : __('Book This Offer', 'iva_theme_front'); if (get_query_var('paged')) { $paged = get_query_var('paged'); } elseif (get_query_var('page')) { $paged = get_query_var('page'); } else { $paged = 1; } if ($offers_postid != '') { $postid_array = array(); $postid_array = explode(',', $offers_postid); $args = array('post_type' => 'offers', 'posts_per_page' => $offers_limits, 'post__in' => $postid_array, 'paged' => $paged, 'orderby' => $offers_orderby, 'order' => $offers_order); } else { $args = array('post_type' => 'offers', 'posts_per_page' => $offers_limits, 'paged' => $paged, 'orderby' => $offers_orderby, 'order' => $offers_order); } $iva_ofrs_query = query_posts($args); // $wp_query = new WP_Query( $args ); // if ( $wp_query->have_posts()) : while ( $wp_query->have_posts()) : $wp_query->the_post(); $out = ''; if (have_posts()) { while (have_posts()) { the_post(); global $post; $img_alt_title = get_the_title($post->ID); $out .= '<div class="special_offers_item">'; $out .= '<div class="one_third nomargin">'; $out .= '<div class="offer-photo">'; if (has_post_thumbnail()) { $out .= '<div class="offer-img"><figure>' . atp_resize($post->ID, '', '480', '566', '') . '</figure></div>'; } $out .= '</div>'; // End photo div $out .= '</div>'; // End Of one_third $out .= '<div class="two_third nomargin">'; $out .= '<div class="offers-content">'; $out .= '<h2>' . get_the_title() . '</h2>'; $out .= '<h2><a href="' . get_permalink() . '"></a></h2>'; // $out .= the_excerpt(); $out .= substr($post->post_content, 0, 150); $out .= '<div class="offer-btn">'; $out .= '<a href="' . get_permalink() . '" class=" btn medium dark border ' . $iva_ofr_btn_color . ' ">'; $out .= '<span>' . $iva_ofr_btn_txt . '</span>'; $out .= '</a>'; $out .= '</div>'; // offer-btn $out .= '</div>'; // offers-content $out .= '</div>'; // End of two_third $out .= '</div>'; // special_offers_item } $out .= '<div class="clear"></div>'; // if ($offers_pagination == 'yes') { if (function_exists('iva_pagination')) { $out .= iva_pagination(); } } wp_reset_query(); } return $out; }