the_author_nickname(); ?> </a></h3> <div class="clear"></div> <span><?php echo get_the_time(); ?> / <?php the_time('F d,Y'); ?> </span> </div> <div class="clear"></div> <?php echo "<p>" . get_excerpt_with_hashtag(130) . "</p>"; ?> <ul id="<?php echo get_the_ID(); ?> "> <?php if (!is_user_logged_in()) { ?> <li class="like"> <span> <?php $postid = get_the_ID(); $likecount = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . "post_like WHERE post_id = {$postid}");
$myposts = get_posts($args); foreach ($myposts as $post) { setup_postdata($post); ?> <li> <h2 class="three_section lat_events">Latest Events</h2> <h3 class="animated" data-animation="fadeInDown" data-revert="fadeOutDown"><a href="<?php echo get_permalink(); ?> "> <?php the_title(); ?> </a></h3> <p class="animated" data-animation="fadeIn" data-revert="fadeOut"> <?php echo get_excerpt_with_hashtag(160); ?> </p> </li> <?php } ?> </ul> <a class="read-more" href="#contact"><img src="<?php bloginfo('template_directory'); ?> /images/read-more.png" /></a> </div> <!--container --> </div> <div class="section" id="contact"> <!--container -->
function prayer_page() { global $post; global $wpdb; $page_id = $_POST['page_id']; $pid = $_POST['pid']; $paged = get_query_var('paged') ? get_query_var('paged') : $page_id; $offset_value = $paged * get_option('posts_per_page'); //$args = array( 'cat' => $categoryname,'order'=>'ASC','posts_per_page'=>'6','paged'=>$paged,'offset'=>$offset_value); if ($pid != "") { $args = array('post_type' => 'post', 'orderby' => 'post_date', 'paged' => $paged, 'offset' => $offset_value, 'post__in' => $pid); } query_posts($args); while (have_posts()) { the_post(); //$normal_image = wp_get_attachment_url( get_post_thumbnail_id() ); //$normal_image = get_field("normal_image"); ?> <section> <div class="image-main ff-left"> <a href="<?php the_permalink(); ?> " title=""> <?php if (has_post_thumbnail()) { the_post_thumbnail('custom-size'); } else { ?> <img src="<?php echo get_template_directory_uri(); ?> /library/images/pray-img-1.jpg"> <?php } ?> </a> <div class="img-des"> <ul> <?php $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID, 'thumbnail')); ?> <?php $postid = get_the_ID(); ?> <!-- <li><span class="share"></span></li> --> <li> <a class="fb" href="http://www.facebook.com/sharer.php?s=100&p[title]=<?php the_title(); ?> &p[url]=<?php the_permalink(); ?> &p[summary]=<?php echo get_post_field('post_content', $postid); ?> &p[images][0]=<?php echo $url; ?> " onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;" title="Facebook"></a> </li> <li> <a class="twt" href="http://twitter.com/home?status=<?php the_title(); ?> +<?php the_permalink(); ?> +<?php echo substr($post->post_content, 0, 80); ?> " onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;" title="Twitter"></a> </li> <li> <a class="gp" href="https://plus.google.com/share?url=<?php the_permalink(); ?> " onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600');return false;" title="Google+"></a> </li> </ul> <!-- <p>I’m telling my friends to pray</p> --> </div> </div> <div class="user-detail ff-left" id="<?php the_author_ID(); ?> "> <!----user avtar----> <?php $authore_id = get_the_author_meta('ID'); ?> <?php $provider = get_the_author_meta("wsl_current_provider", $authore_id); ?> <?php if ($provider == "") { ?> <?php $user_pix = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "user_avtar WHERE user_id = {$authore_id}"); ?> <?php if ($user_pix->user_avtar == "") { ?> <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> " title="<?php the_author_nickname(); ?> "><img src="<?php echo get_template_directory_uri(); ?> /library/images/epray-icon.png" class="avtr_img" /></a> <?php } else { ?> <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> " title="<?php the_author_nickname(); ?> "><img src="<?php bloginfo('stylesheet_directory'); ?> /library/avtar/<?php echo $user_pix->user_avtar; ?> " class="avtr_img"/></a> <?php } ?> <?php } else { ?> <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> " title="<?php the_author_nickname(); ?> "><?php echo get_avatar($authore_id, 60); ?> </a> <?php } ?> <!----user avtar----> <div class="user-name"> <?php if (!is_user_logged_in()) { ?> <h3><a href="#Loginform" title="<?php the_author_nickname(); ?> "><?php the_author_nickname(); ?> </a></h3> <?php } else { ?> <h3><a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> " title="<?php the_author_nickname(); ?> "><?php the_author_nickname(); ?> </a></h3> <?php } ?> <div class="clear"></div> <span><?php echo get_the_time(); ?> / <?php the_time('F d,Y'); ?> </span> </div> <div class="clear"></div> <?php echo "<p>" . get_excerpt_with_hashtag(130) . "</p>"; ?> <ul id="<?php echo get_the_ID(); ?> "> <?php if (!is_user_logged_in()) { ?> <a href="#Loginform"> <li class="like"> <span> <?php $postid = get_the_ID(); $likecount = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . "post_like WHERE post_id = {$postid}"); echo $likecount; ?> </span> </li> </a> <?php } else { ?> <a href="javascript:void(0);" class="like_plus" title="I'm Praying"> <li class="like"> <span> <?php $postid = get_the_ID(); $likecount = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . "post_like WHERE post_id = {$postid}"); echo $likecount; ?> </span> </li> </a> <?php } ?> <?php if (!is_user_logged_in()) { ?> <a href="#Loginform"> <li class="list"> <span><?php $postid = get_the_ID(); $prayerlistcount = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . "user_paryer_list WHERE post_id = {$postid}"); echo trim($prayerlistcount); ?> </span> </li> </a> <?php } else { ?> <a href="javascript:void(0);" class="prayer_list" title="Add to Prayer List"> <li class="list"> <span><?php $postid = get_the_ID(); $prayerlistcount = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . "user_paryer_list WHERE post_id = {$postid}"); echo trim($prayerlistcount); ?> </span> </li> </a> <?php } ?> <?php if (!is_user_logged_in()) { ?> <a href="#Loginform"> <li class="ref"> <span><?php echo $my_var = get_comments_number($post_id); ?> </span> </li> </a> <?php } else { ?> <a href="<?php the_permalink(); ?> #prayerform" title="Prayer Replies"> <li class="ref"> <span><?php echo $my_var = get_comments_number($post_id); ?> </span> </li> </a> <?php } ?> </ul> <?php $posttags = get_the_tags(); $postid = get_the_ID(); //print_r($posttags); if (is_array($posttags)) { foreach ($posttags as $tag) { if (!is_user_logged_in()) { ?> <a class="prg_notlog" href="#Loginform" title="<?php echo $tag->name; ?> ">#<?php echo $tag->name; ?> </a> <?php } else { ?> <a class="prg" href="javascript:void(0);" id="<?php echo $postid; ?> " title="<?php echo $tag->name; ?> ">#<?php echo $tag->name; ?> </a> <?php } ?> <?php } } ?> </div> </section> <?php } die; }