• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_post_image函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_post_image函数的典型用法代码示例。如果您正苦于以下问题:PHP get_post_image函数的具体用法?PHP get_post_image怎么用?PHP get_post_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_post_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
        $text = apply_filters('widget_text', empty($instance['text']) ? '' : $instance['text'], $instance);
        $show_excerpt = apply_filters('widget_text', empty($instance['excerpt']) ? '' : $instance['excerpt'], $instance);
        $post_offset = (isset($instance['post_offset']) and is_numeric($instance['post_offset'])) ? $instance['post_offset'] : 0;
        $tag_to_get = empty($instance['tag']) ? 'featured' : $instance['tag'];
        echo $before_widget;
        global $post;
        $args = array('tag' => $tag_to_get, 'numberposts' => 10, 'offset' => $post_offset, 'ignore_sticky_posts' => 1, 'order' => 'DESC');
        if ($instance['order'] == 'popular') {
            $args['meta_key'] = 'wpb_post_views_count';
            $args['orderby'] = 'wpb_post_views_count';
        }
        echo !empty($title) ? '<h3 class="widget-head">' . $title . '</h3>' : '';
        $myposts = get_posts($args);
        $views_array = array();
        ?>
		<div class="swiper-container swiper-container-featured">
		    <a class="arrow-left" href="#"></a>
			<a class="arrow-right" href="#"></a>
    		<div class="swiper-pagination"></div>
			<div class="swiper-wrapper"><?php 
        foreach ($myposts as $post) {
            if (has_post_thumbnail()) {
                ?>
 
						<div class="swiper-slide swiper-slide-large" style="width:763px;"> <?php 
                setup_postdata($post);
                ?>
					        	<a href="<?php 
                echo get_permalink($post->ID);
                ?>
" style="background-image: url('<?php 
                echo get_post_image($post->ID, 'featured_post');
                ?>
')">
					        		<h3 class="post-title"><?php 
                echo $post->post_title;
                if ($show_excerpt) {
                    ?>
					        			<p class="post-excerpt"><?php 
                    echo substr(get_the_excerpt(), 0, 75);
                    ?>
</p><?php 
                }
                ?>
					        		</h3>
					        	</a> 
						</div><?php 
            }
        }
        ?>
			</div> <!-- swiper-wrapper -->
		</div> <!-- swiper-container --><?php 
        echo $after_widget;
    }
开发者ID:aaronramirez,项目名称:ssbd,代码行数:58,代码来源:bl_featured_post.php


示例2: substr

    ?>
</h3>
                <p><?php 
    echo substr($slider5->description, 0, 15) . '...';
    ?>
</p>
                <button type="button" class="btn btn-sm btn-danger pull-right btn5">View</button></a>
            </li>
            <?php 
}
$sel_Query8 = "SELECT * FROM `resumes`  where promote_resumes3 = 'sidebar' and country='{$country_name}' and payment_status = '1'   ORDER BY id desc LIMIT 1";
$query8 = mysql_query($sel_Query8);
while ($slider6 = mysql_fetch_object($query8)) {
    ?>
            <li class="content2" style="margin-top:10px;"><img src="img/<?php 
    echo get_post_image($slider6->id, 'resumes');
    ?>
" class="img-responsive">

            <a href="getresumes.php?id=<?php 
    echo $slider6->id;
    ?>
"><h3><?php 
    echo get_post_tile_string($slider6->resumes_title);
    ?>
</h3>
                <p><?php 
    echo substr($slider6->description, 0, 15) . '...';
    ?>
</p>
                <button type="button" class="btn btn-sm btn-danger pull-right btn5">View</button></a>
开发者ID:sashakozakov,项目名称:trademydeals,代码行数:31,代码来源:footer.php


示例3: elseif

    $go = $default;
} elseif (!is_numeric($go)) {
    $go = $default;
}
$nol = $go;
$start = isset($_GET['offset']) && $_GET['offset'] != '' ? ($_GET['offset'] - 1) * $default : 0;
$limit = "{$start}, {$nol}";
$count = 1;
$top_query = mysql_query("SELECT * FROM `jobs` WHERE `urgent`='urgent' and payment_status = '1' ORDER BY id desc LIMIT {$limit}");
//date_time DESC
while ($top = mysql_fetch_array($top_query)) {
    ?>
                            <div class="col-lg-12 content3" style="background:#f4fcdd;" >
                              <div class="col-lg-2">
                                 <img src="img/<?php 
    echo get_post_image($top['id'], 'jobs');
    ?>
" class="img-responsive">
                                </div>
                                <div class="col-lg-10  ">
                                   	<a href="getjobs.php?id=<?php 
    echo $top['id'];
    ?>
"><h3 style="margin-left:20px;"><?php 
    echo get_post_tile_string($top['jobs_title']);
    ?>
</h3>
                                        <p style="margin-left:20px;"><?php 
    echo substr($top['description'], 0, 15) . '...';
    ?>
</p>
开发者ID:sashakozakov,项目名称:trademydeals,代码行数:31,代码来源:urgent-jobs.php


示例4: get_post_image

    ?>
                    <div class="col-lg-4">
                        <?php 
    if ($row->promote_ads == 'high') {
        echo "<div class='high'>";
    } else {
        echo "<div class='slider'>";
    }
    ?>

                        <?php 
    $imgdeal = $row->images;
    ?>

                        <img src="img/<?php 
    echo get_post_image($row->id, 'ads');
    ?>
" class="img-responsive">


                        <a href="getads.php?id=<?php 
    echo $row->id;
    ?>
">
                            <h3><?php 
    echo get_post_tile_string($row->ads_title);
    ?>
</h3>


                            <p><?php 
开发者ID:sashakozakov,项目名称:trademydeals,代码行数:31,代码来源:ads.php


示例5: mysql_query

                                <td><input type="hidden" size="34" name="longitude" value="" id="lng"/></td>
                            </tr>
                        </table>
                        <div class="col-lg-12 getadscon" style=" margin-top:20px;">
                            <div class="sub1 col-lg-12"
                                 style="background:#FFCC33; border:#FFCC33 solid 1px; border-radius:0px;">
                                <h4>Hot coupons</h4>
                            </div>
                            <div class="col-lg-12 getadscon"><?php 
$top_query = mysql_query("SELECT * FROM `coupons` where payment_status = '1' ORDER BY id DESC LIMIT 3");
while ($top = mysql_fetch_array($top_query)) {
    ?>
                                    <div class="col-lg-4">
                                    <div class="content2" style="margin-top:10px;">
                                        <img src="img/<?php 
    echo get_post_image($top->id, 'coupons');
    ?>
"
                                             class="img-responsive">
                                        <a href="getcoupons.php?id=<?php 
    echo $top['id'];
    ?>
">
                                            <h3><?php 
    echo get_post_tile_string($top['coupon']);
    ?>
</h3>

                                            <p><?php 
    echo $top['description'] == '' ? '' : substr(htmlspecialchars($top['description']), 0, 20) . '...';
    ?>
开发者ID:sashakozakov,项目名称:trademydeals,代码行数:31,代码来源:getcoupons.php


示例6: the_permalink

<li class="clearfloat">
            <a href="<?php 
the_permalink();
?>
" rel="bookmark" title="<?php 
the_title();
?>
"><?php 
echo get_post_image(get_the_id(), '', '', '' . get_bloginfo('template_url') . '/scripts/timthumb.php?zc=1&amp;w=80&amp;h=65&amp;src=');
?>
</a>
			
	<h4><a href="<?php 
the_permalink();
?>
" rel="bookmark" title="<?php 
the_title();
?>
"><?php 
the_title();
?>
</a></h4> 
			
		<p class="postmetadata"><?php 
the_time('F j, Y');
?>
</p>  
			</li>
开发者ID:sroegner,项目名称:cos-mimbo,代码行数:28,代码来源:archivelist.php


示例7: mysql_query

$sql = mysql_query("{$query} LIMIT {$limit}") or die("Error in query: {$sql}" . mysql_error());
while ($row = mysql_fetch_object($sql)) {
    ?>

                            <div class="col-lg-4">
                                <?php 
    if ($row->promote_coupons == 'high') {
        echo "<div class='high'>";
    } else {
        echo "<div class='slider'>";
    }
    ?>


                                <img src="img/<?php 
    echo get_post_image($row->id, 'coupons');
    ?>
" class="img-responsive">
                                <a href="getdeals.php?id=<?php 
    echo $row->id;
    ?>
"><h3><?php 
    echo get_post_tile_string($row->coupons_title);
    ?>
</h3>
                                    <p><?php 
    echo substr($row->description, 0, 15) . '...';
    ?>
</p>
                                    <button type="button" class="btn btn-sm btn-danger pull-right btn5">View</button>
                                </a> </div>
开发者ID:sashakozakov,项目名称:trademydeals,代码行数:31,代码来源:featured_coupons.php


示例8: mysql_query

$sql = mysql_query("{$query} LIMIT {$limit}") or die("Error in query: {$sql}" . mysql_error());
while ($row = mysql_fetch_object($sql)) {
    ?>

                            <div class="col-lg-4">
                                <?php 
    if ($row->promote_flyers == 'high') {
        echo "<div class='high'>";
    } else {
        echo "<div class='slider'>";
    }
    ?>


                                <img src="img/<?php 
    echo get_post_image($row->id, 'flyers');
    ?>
" class="img-responsive">
                                <a href="getdeals.php?id=<?php 
    echo $row->id;
    ?>
"><h3><?php 
    echo get_post_tile_string($row->flyers_title);
    ?>
</h3>
                                    <p><?php 
    echo substr($row->description, 0, 15) . '...';
    ?>
</p>
                                    <button type="button" class="btn btn-sm btn-danger pull-right btn5">View</button>
                                </a> </div>
开发者ID:sashakozakov,项目名称:trademydeals,代码行数:31,代码来源:featured_flyers.php


示例9: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
        $text = apply_filters('widget_text', empty($instance['text']) ? '' : $instance['text'], $instance);
        $post_offset = (isset($instance['post_offset']) and is_numeric($instance['post_offset'])) ? $instance['post_offset'] : 0;
        $tag_to_get = !of_get_option('featured_tag') ? 'featured' : of_get_option('featured_tag');
        echo $before_widget;
        global $post;
        // if it's not a slider
        if (empty($instance['slider']) || !$instance['slider']) {
            if ($instance['order'] == 'popular') {
                $args = array('tag' => $tag_to_get, 'numberposts' => 1, 'offset' => $post_offset, 'meta_key' => 'wpb_post_views_count', 'orderby' => 'wpb_post_views_count', 'ignore_sticky_posts' => 1, 'order' => 'DESC');
            } else {
                $args = array('tag' => $tag_to_get, 'numberposts' => 1, 'offset' => $post_offset, 'ignore_sticky_posts' => 1, 'order' => 'DESC');
            }
            $myposts = get_posts($args);
            if (has_post_format('video', $myposts[0]->ID) && $instance['video']) {
                echo !empty($title) ? '<h3 class="widget-head">' . $title . '<a class="scale" href="' . get_permalink($myposts[0]->ID) . '">' . $myposts[0]->post_title . '</a></h3>' : '<a class="scale" href="' . get_permalink($myposts[0]->ID) . '"><h3>' . $myposts[0]->post_title . '</h3></a>';
            } else {
                echo !empty($title) ? '<h3 class="widget-head">' . $title . '</h3>' : '';
            }
            echo '<div class="widget-body">';
            if (has_post_format('video', $myposts[0]->ID) && $instance['video']) {
                $video_content = get_post_meta($myposts[0]->ID, '_format_video_embed', true);
                $video_content = preg_replace('#\\<iframe(.*?)\\ssrc\\=\\"(.*?)\\"(.*?)\\>#i', '<iframe$1 src="$2?wmode=opaque"$3>', $video_content);
                $video_content = preg_replace('#\\<iframe(.*?)\\ssrc\\=\\"(.*?)\\?(.*?)\\?(.*?)\\"(.*?)\\>#i', '<iframe$1 src="$2?$3&$4"$5>', $video_content);
                echo $video_content;
            } else {
                echo '<img src="' . get_post_image($myposts[0]->ID, 'featured_post') . '">';
                echo '<div class="featured_post_overlay"></div>';
            }
            echo '<h4><a class="scale" href="' . get_permalink($myposts[0]->ID) . '">' . $myposts[0]->post_title . '</a></h4>';
            if (!empty($instance['excerpt']) && $instance['excerpt']) {
                echo '<p>' . bl_truncate($myposts[0]->post_content, 65, ' ') . '</p>';
            }
            echo '</div>';
        } else {
            if ($instance['order'] == 'popular') {
                $args = array('tag' => $tag_to_get, 'numberposts' => 5, 'offset' => $post_offset, 'meta_key' => 'wpb_post_views_count', 'orderby' => 'wpb_post_views_count', 'ignore_sticky_posts' => 1, 'order' => 'DESC');
            } else {
                $args = array('tag' => $tag_to_get, 'numberposts' => 5, 'offset' => $post_offset, 'ignore_sticky_posts' => 1, 'order' => 'DESC');
            }
            $myposts = get_posts($args);
            $views_array = array();
            echo '<ul class="featured_gallery clearfix">';
            foreach ($myposts as $post) {
                echo '<li>';
                if (has_post_format('video', $post->ID) && $instance['video']) {
                    echo !empty($title) ? '<h3 class="widget-head">' . $title . '<a class="scale" href="' . get_permalink($post->ID) . '">' . $post->post_title . '</a></h3>' : '<a class="scale" href="' . get_permalink($post->ID) . '"><h3>' . $post->post_title . '</h3></a>';
                } else {
                    echo !empty($title) ? '<h3 class="widget-head">' . $title . '</h3>' : '';
                }
                echo '<div class="widget-body">';
                if (has_post_format('video', $post->ID) && $instance['video']) {
                    $video_content = get_post_meta($post->ID, '_format_video_embed', true);
                    $video_content = preg_replace('#\\<iframe(.*?)\\ssrc\\=\\"(.*?)\\"(.*?)\\>#i', '<iframe$1 src="$2?wmode=opaque"$3>', $video_content);
                    $video_content = preg_replace('#\\<iframe(.*?)\\ssrc\\=\\"(.*?)\\?(.*?)\\?(.*?)\\"(.*?)\\>#i', '<iframe$1 src="$2?$3&$4"$5>', $video_content);
                    echo $video_content;
                } else {
                    echo '<img src="' . get_post_image($post->ID, 'featured_post') . '">';
                    echo '<div class="featured_post_overlay"></div>';
                }
                echo '<h4><a class="scale" href="' . get_permalink($post->ID) . '">' . $post->post_title . '</a></h4>';
                if (!empty($instance['excerpt']) && $instance['excerpt']) {
                    echo '<p>' . bl_truncate($post->post_content, 65, ' ') . '</p>';
                }
                echo '</div>';
                echo '</li>';
            }
            echo '</ul>';
            echo '<div class="left_arrow featured_box_arrow visible-desktop"><i class="icon-left-open-1"></i></div>';
            echo '<div class="right_arrow featured_box_arrow visible-desktop"><i class="icon-right-open-1"></i></div>';
            ?>
			<script type="text/javascript">
				jQuery(function(){

				    total_images = <?php 
            echo count($myposts) - 1;
            ?>
,
		      		li_index = 0;
		      		li_width = '100%';
		      		li_height = jQuery( '.featured_gallery li' ).eq(0).height();
		      		jQuery( '.featured_gallery').closest( '.bl_featured_post' ).css('height', li_height);
		      		jQuery('.featured_box_arrow').click(function(){
		      			if(jQuery(this).hasClass('left_arrow') && li_index > 0){
	      					li_height = jQuery( this ).siblings('.featured_gallery').children('li').eq(li_index-1).height();
	      					jQuery( this ).closest('.bl_featured_post').animate({height: li_height}, 150, 'swing')
		      				jQuery( this ).siblings('.featured_gallery').animate({left: '+='+li_width}, 150, 'swing');
		      				li_index--;
		      			}else if(jQuery(this).hasClass('right_arrow') && li_index < total_images){
	      					li_height = jQuery( this ).siblings('.featured_gallery').children('li').eq(li_index+1).height();
	      					jQuery( this ).closest('.bl_featured_post').animate({height: li_height}, 150, 'swing')
		      				jQuery( this ).siblings('.featured_gallery').animate({left: '-='+li_width}, 150, 'swing');
		      				li_index++;
		      			}
		  			});
		  		});
		    </script><?php 
//.........这里部分代码省略.........
开发者ID:aaronramirez,项目名称:ssbd,代码行数:101,代码来源:bl_featured_post_old.php


示例10: blog_open_graph_meta

    function blog_open_graph_meta()
    {
        global $data, $post, $paged, $page;
        $ogImg = false;
        //    if(is_page_template('page.php') || is_single()) {
        if (is_page() || is_single()) {
            $ogImg = get_post_image();
            if (!$ogImg) {
                $ogImg = get_post_first_image();
            }
            if (!$ogImg) {
                $ogImg = get_youtube_vimeo_thumb_url(get_post_meta($post->ID, 'tt-video-embed', true));
            }
            if (!$ogImg) {
                $slide_imgs = get_post_meta($post->ID, 'tt_slide_images', true);
                $ogImg = !empty($slide_imgs[0]['image']) ? $slide_imgs[0]['image'] : false;
            }
        }
        ?>
        <!-- START - Open Graph Meta -->
        <meta property='og:title' 	    content='<?php 
        wp_title('|', true, 'right');
        bloginfo('name');
        $site_description = get_bloginfo('description', 'display');
        if ($site_description && (is_home() || is_front_page())) {
            echo " | {$site_description}";
        }
        if ($paged >= 2 || $page >= 2) {
            echo ' | ' . sprintf(__('Page %s', 'themeton'), max($paged, $page));
        }
        ?>
'/>
        <meta property='og:image' 	content='<?php 
        echo $ogImg ? $ogImg : '';
        ?>
'/>
        <meta property='og:site_name'   content='<?php 
        bloginfo('name');
        ?>
'/>
        <meta property='og:description' content='<?php 
        echo get_bloginfo('description');
        ?>
'/>
        <!-- END   - Open Graph Meta --><?php 
    }
开发者ID:earthshakira,项目名称:rachanasansad-portfolio,代码行数:46,代码来源:functions.php


示例11: foreach

foreach ($po as $pos) {
    ?>
   
                    <?php 
    setup_postdata($pos);
    ?>
                <div class="content_left col-lg-4 col-md-4 col-sm-5 col-xs-12">
                   <a href='<?php 
    echo get_permalink($pos->ID);
    ?>
'>  
          <?php 
    if (get_the_post_thumbnail($pos->ID, 'one')) {
        echo get_the_post_thumbnail($pos->ID, 'one', true);
    } else {
        get_post_image($pos->post_content);
    }
    ?>
                       <?php 
    // get_post_image($pos->post_content);
    ?>
 </a><br>
                   <b><?php 
    echo substr($pos->post_title, 0, 15);
    ?>
......</b><br>
                    <small>
                        <img src="<?php 
    bloginfo('template_url');
    ?>
/images/touxiang1.png">Postedby:<?php 
开发者ID:pzyzeyun,项目名称:wordpress-ups,代码行数:31,代码来源:index.php


示例12: widget

 /** use this function to decide how the widget
 	will display in your theme */
 public function widget($args, $instance)
 {
     if (is_single()) {
         extract($args);
         $title = apply_filters('widget_title', $instance['title']);
         $show_meta = $instance['meta'];
         $show_thumbnail = $instance['thumbnail'];
         $count = esc_attr($instance['count']);
         if (!$count) {
             $count = 3;
         }
         $count = (int) $count;
         $duration = esc_attr($instance['duration']);
         if (!$duration) {
             $duration = 1;
         }
         $duration = (int) $duration;
         echo $before_widget;
         if ($title) {
             echo $before_title . $title . $after_title;
         }
         // save post for backup later
         global $post;
         $origin_post = $post;
         /*QUERY*/
         // common query
         $args = array('posts_per_page' => $count, 'order' => 'DESC', 'orderby' => 'rand', 'post__not_in' => array($post->ID));
         // time query
         if ($duration == 2) {
             //1 year ago
             $args = wp_parse_args($args, array('date_query' => array(array('column' => 'post_date_gmt', 'before' => '1 year ago'))));
         } else {
             if ($duration == 3) {
                 //1 month ago
                 $args = wp_parse_args($args, array('date_query' => array(array('column' => 'post_date_gmt', 'before' => '1 month ago'))));
             } else {
                 if ($duration == 4) {
                     //1 week ago
                     $args = wp_parse_args($args, array('date_query' => array(array('column' => 'post_date_gmt', 'before' => '1 week ago'))));
                 }
             }
         }
         $tags = wp_get_post_tags($post->ID);
         if ($tags) {
             /*Get post from tags if post had at least 1 tag*/
             $tag_ids = array();
             foreach ($tags as $tag) {
                 $tag_ids[] = $tag->term_id;
             }
             $args = wp_parse_args($args, array('tag__in' => $tag_ids));
         } else {
             $cat_ids = wp_get_post_categories($post->ID);
             if ($cat_ids) {
                 /*in case empty tags, get from cate*/
                 $args = wp_parse_args($args, array('category__in ' => $cat_ids));
             }
             /* else: just random posts */
         }
         $my_query = new WP_Query($args);
         // Show HTML
         if ($my_query->have_posts()) {
             echo '<div class="news-box three related-news"><div class="outer"><ul class="content">';
             $counter = 0;
             while ($my_query->have_posts()) {
                 $my_query->the_post();
                 // preparing for flexible home layout output
                 $item_img_medium = '<a href="' . get_permalink() . '" title="' . __('Click to read', THEME_DOMAIN) . '" class="item-thumbnail">' . get_post_image(get_the_ID(), 'medium', array('alt' => 'item-thumbnail', 'title' => esc_attr(get_the_title()))) . '</a>';
                 $item_title = '<h3 class="title"><a href="' . get_permalink() . '" title="' . __('Click to read', THEME_DOMAIN) . '">' . get_the_title() . '</a></h3>';
                 $item_snip = get_the_snippet();
                 $item_meta = '<div class="meta">';
                 if (comments_open()) {
                     $item_meta .= '<a href="' . get_comments_link() . '" class="comment"><i class="icon"></i><span>' . get_comments_number() . '</span></a>';
                 }
                 $item_meta .= '<a href="' . get_permalink() . '" class="date"><i class="icon"></i><span>' . get_the_date() . '</span></a>';
                 $item_meta .= '</div>';
                 echo '<li class="item item-' . $counter . ' item-' . ($counter == 0 ? 'first' : 'other') . '"><div class="inner">';
                 echo ($show_thumbnail ? $item_img_medium : '') . ($show_meta ? $item_meta : '') . $item_title;
                 echo '<div class="clear"></div></div></li>';
                 $counter++;
             }
             echo '</ul></div><div class="clear"></div></div>';
         }
         wp_reset_postdata();
         echo $after_widget;
         $post = $origin_post;
     }
     // is_single
 }
开发者ID:bencet,项目名称:presszo,代码行数:90,代码来源:define_widgets.php


示例13: mysql_query

$sql = mysql_query("{$query} LIMIT {$limit}") or die("Error in query: {$sql}" . mysql_error());
while ($row = mysql_fetch_object($sql)) {
    ?>

                            <div class="col-lg-4">
                                <?php 
    if ($row->promote_resumes == 'high') {
        echo "<div class='high'>";
    } else {
        echo "<div class='slider'>";
    }
    ?>


                                <img src="img/<?php 
    echo get_post_image($row->id, 'resumes');
    ?>
" style="max-height: 100px;"  height="100px">
                                <a href="getresumes.php?id=<?php 
    echo $row->id;
    ?>
"><h3 style="margin-left:20px;"><?php 
    echo get_post_tile_string($row->resumes_title);
    ?>
</h3>
                                    <p><?php 
    echo substr($row->description, 0, 15) . '...';
    ?>
</p>
                                    <button type="button" class="btn btn-sm btn-danger pull-right btn5">View</button>
                                </a> </div>
开发者ID:sashakozakov,项目名称:trademydeals,代码行数:31,代码来源:featured_resumes.php


示例14: the_tags

<?php 
if (has_tag() && !of_get_option('disable_footer_post')) {
    ?>
	<ul><?php 
    the_tags('<li>', ', ', '</li>');
    ?>
	</ul><?php 
}
if (!of_get_option('disable_share_story')) {
    $share_buttons_disabled = of_get_option('share_buttons_disabled');
    $share_buttons_position = of_get_option('share_buttons_position');
    if (is_single() && !empty($share_buttons_position['single']) || is_home() && !empty($share_buttons_position['blog']) || is_page() && !empty($share_buttons_position['pages'])) {
        $share_image = $share_title = urlencode(html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8'));
        $share_url = urlencode(get_permalink());
        $share_image = urlencode(get_post_image(get_the_ID(), 'large', false));
        ?>
			<div class="share-story-container">
				<h4 class="muted pull-left"><?php 
        _e('Share story', 'bluth');
        ?>
</h4>
				<ul class="share-story">
					<?php 
        if (!$share_buttons_disabled['facebook']) {
            ?>
<li><a class="tips" data-title="Facebook" href="javascript:void(0);" onClick="social_share('http://www.facebook.com/sharer.php?u=<?php 
            echo $share_url;
            ?>
&t=<?php 
            echo $share_title;
开发者ID:aaronramirez,项目名称:ssbd,代码行数:30,代码来源:meta-bottom.php


示例15: get_slides


//.........这里部分代码省略.........
     } elseif ($args['source']['type'] === 'category') {
         $catid = (array) explode(',', $args['source']['val']);
         $order = $args['order'];
         //  title/created/ordering/hits
         $order_by = $args['order_by'];
         // asc/desc
         if ($order == '') {
             $orderby = '';
         } else {
             if ($order == 'title') {
                 $orderby = 'a.title ' . $order_by . ' ';
             } else {
                 if ($order == 'created') {
                     $orderby = 'a.created ' . $order_by . ' ';
                 } else {
                     if ($order == 'modified') {
                         $orderby = 'a.modified ' . $order_by . ' ';
                     } else {
                         if ($order == 'publish_up') {
                             $orderby = 'a.publish_up ' . $order_by . ' ';
                         } else {
                             if ($order == 'ordering') {
                                 $orderby = 'a.ordering ' . $order_by . ' ';
                             } else {
                                 if ($order == 'hits') {
                                     $orderby = 'a.hits ' . $order_by . ' ';
                                 }
                             }
                         }
                     }
                 }
             }
         }
         $results = self::getArticles($catid, $order, $orderby, $args['limit'], $args['offset']);
     } elseif ($args['source']['type'] === 'k2-category') {
         $catid = (array) explode(',', $args['source']['val']);
         $order = $args['order'];
         //    title/created/ordering/hits
         $order_by = $args['order_by'];
         // asc/desc
         if ($order == '') {
             $orderby = '';
         } else {
             if ($order == 'title') {
                 $orderby = 'a.title ' . $order_by . ' ';
             } else {
                 if ($order == 'created') {
                     $orderby = 'a.created ' . $order_by . ' ';
                 } else {
                     if ($order == 'modified') {
                         $orderby = 'a.modified ' . $order_by . ' ';
                     } else {
                         if ($order == 'publish_up') {
                             $orderby = 'a.publish_up ' . $order_by . ' ';
                         } else {
                             if ($order == 'ordering') {
                                 $orderby = 'a.ordering ' . $order_by . ' ';
                             } else {
                                 if ($order == 'hits') {
                                     $orderby = 'a.hits ' . $order_by . ' ';
                                 }
                             }
                         }
                     }
                 }
             }
         }
         $results = self::get_k2_Articles($catid, $order, $orderby, $args['limit'], $args['offset']);
     }
     // Loop through posts
     if (is_array($results)) {
         foreach ($results as $post) {
             // Get post thumbnail ID
             if ($args['source']['type'] === 'k2-category') {
                 $k2_img = JPATH_SITE . '/media/k2/items/cache/' . md5("Image" . $post->id) . '_XL.jpg';
                 if (file_exists($k2_img)) {
                     $thumb = 'media/k2/items/cache/' . md5("Image" . $post->id) . '_XL.jpg';
                 } else {
                     $thumb = null;
                 }
                 $link = K2HelperRoute::getItemRoute($post->id . ':' . urlencode($post->alias), $post->catid . ':' . urlencode($post->categoryalias));
             } elseif ($args['source']['type'] === 'category') {
                 $thumb = get_post_image($post);
                 $slug = $post->id . ':' . $post->alias;
                 $catslug = $post->catid . ':' . $post->category_alias;
                 $link = JRoute::_(ContentHelperRoute::getArticleRoute($slug, $catslug));
             } elseif ($args['source']['type'] === 'media') {
                 $thumb = $post->id;
                 $link = $slide['image'];
             } else {
                 $thumb = null;
             }
             // post array
             $slide = array('id' => $post->id, 'alias' => $post->alias, 'created_by' => $post->created_by, 'category' => $post->category_title, 'title' => $post->title, 'introtext' => $post->introtext, 'fulltext' => $post->fulltext, 'image' => $thumb, 'link' => $link, 'created' => $post->created, 'hits' => $post->hits);
             $slides[] = $slide;
         }
     }
     // Return slides
     return $slides;
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:101,代码来源:tools.php


示例16: elseif

    $go = $default;
} elseif (!is_numeric($go)) {
    $go = $default;
}
$nol = $go;
$start = isset($_GET['offset']) && $_GET['offset'] != '' ? ($_GET['offset'] - 1) * $default : 0;
$limit = "{$start}, {$nol}";
$count = 1;
$top_query = mysql_query("SELECT * FROM `resumes` WHERE `urgent`='urgent' and payment_status = '1' ORDER BY id desc LIMIT {$limit}");
//date_time DESC
while ($top = mysql_fetch_array($top_query)) {
    ?>
                            <div class="col-lg-12 content3" style="background:#f4fcdd;" >
                              <div class="col-lg-2">
                                 <img src="img/<?php 
    echo get_post_image($top['id'], 'resumes');
    ?>
" class="img-responsive">
                                </div>
                                <div class="col-lg-10  ">
                                   	<a href="getresumes.php?id=<?php 
    echo $top['id'];
    ?>
"><h3 style="margin-left:20px;"><?php 
    echo get_post_tile_string($top['resumes_title']);
    ?>
</h3>
                                        <p style="margin-left:20px;"><?php 
    echo substr($top['description'], 0, 15) . '...';
    ?>
</p>
开发者ID:sashakozakov,项目名称:trademydeals,代码行数:31,代码来源:urgent-resumes.php


示例17: get_post_format

" class="nav-previous" style="width: 49%;"> <?php 
        $post_format = get_post_format($post->ID) ? get_post_format($post->ID) : 'standard';
        ?>
								<div class="bgfallback">&nbsp;</div><?php 
        if ($post) {
            ?>
									<span>&nbsp;</span>
									<div class="tab_icon tab_<?php 
            echo $post_format;
            ?>
"><i class="<?php 
            echo get_post_icon($post->ID);
            ?>
"></i></div>
									<div class="bgimage" style="background-image: url('<?php 
            echo get_post_image($post->ID, 'small');
            ?>
');"></div>
									<h5 style="padding-top: 25px;"><?php 
            echo get_the_title($post->ID);
            ?>
</h5><?php 
            echo the_excerpt();
        }
        ?>
							</a> <?php 
    }
    echo '</div>';
}
wp_reset_query();
$my_query2 = new wp_query(array('posts_per_page' => 50, 'author' => $curauth->ID));
开发者ID:aaronramirez,项目名称:ssbd,代码行数:31,代码来源:author.php


示例18: mysql_query

                                <td width="70"></td>
                                <td><input type="hidden" size="34" name="longitude" value="" id="lng" /></td>
                            </tr>
                        </table>
                        <div class="col-lg-12 getadscon" style=" margin-top:20px;">
                    <div class="sub1 col-lg-12" style="background:#FFCC33; border:#FFCC33 solid 1px; border-radius:0px;">
                        <h4>Hot deals</h4>
                    </div>
                    <div class="col-lg-12 getadscon" ><?php 
$top_query = mysql_query("SELECT * FROM `deals` where payment_status = '1' ORDER BY id DESC LIMIT 3");
while ($top = mysql_fetch_array($top_query)) {
    ?>
                         <div class="col-lg-4">
                            <div class="content2" style="margin-top:10px;">
                                        <img src="img/<?php 
    echo get_post_image($top['id'], 'deals');
    ?>
" class="img-responsive">
                                       <a href="getdeals.php?id=<?php 
    echo $top['id'];
    ?>
"><h3><?php 
    echo get_post_tile_string($top['deals_title']);
    ?>
</h3>
                                        <p><?php 
    echo $top['description'] == '' ? '' : substr(htmlspecialchars($top['description']), 0, 20) . '...';
    ?>
</p>
                                        <button type="button" class="btn btn-sm btn-danger pull-right btn5">View</button>
                                    </a></div>
开发者ID:sashakozakov,项目名称:trademydeals,代码行数:31,代码来源:getdeals.php


示例19: mysql_query

$sql = mysql_query("{$query} LIMIT {$limit}") or die("Error in query: {$sql}" . mysql_error());
while ($row = mysql_fetch_object($sql)) {
    ?>

                            <div class="col-lg-4">
                                <?php 
    if ($row->promote_jobs == 'high') {
        echo "<div class='high'>";
    } else {
        echo "<div class='slider'>";
    }
    ?>


       

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_post_link函数代码示例发布时间:2022-05-15
下一篇:
PHP get_post_gallery_images函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap