?> "> <a href="<?php echo get_category_link($category->term_id); ?> "><?php echo $category->name; ?> </a> </div> <a href="<?php the_permalink(); ?> "> <img src="<?php echo get_post_thumbnail_url('homepage-featured'); ?> " /> <h3><?php echo one_of(simple_fields_fieldgroup('short_title'), get_the_title()); ?> </h3> </a> </li> <?php } wp_reset_postdata(); ?> </ul> </div>
?> </h1> <hr> </div> </div> </div> <div class="row story"> <div class="medium-8 medium-centered columns"> <!-- STORY HEADER --> <div class="story-header"> <?php if (has_post_thumbnail()) { ?> <img src="<?php echo get_post_thumbnail_url('single-hero'); ?> " class="key-img"> <?php } ?> <?php TheOpenStandardSocial::share_links(); ?> </div> <div class="page-content"> <?php the_content(); ?>
function get_banner_slide() { $previous_posts = get_posts('numberposts=3&meta_key=banne_slide&meta_value=on'); $str = ""; if (is_array($previous_posts)) { foreach ($previous_posts as $post) { setup_postdata($post); $thumbnail_img = get_post_thumbnail_url($post->ID); $str .= "<li><img src='" . $thumbnail_img . "' alt='" . $post->post_title . "' /><div class='flex-caption'><h3>" . mb_strimwidth($post->post_title, 0, 40) . "</h3> <p>" . strip_tags(mb_strimwidth($post->post_content, 0, 120, '......')) . "</p><input type='button' value='查看详情' class='red' onclick=\"location.href='" . get_permalink($post->ID) . "'\"/></div></li>"; } } echo $str; }
?> "> <a href="<?php echo get_category_link($category->term_id); ?> "><?php echo $category->name; ?> </a> </div> <a href="<?php the_permalink(); ?> "> <img src="<?php echo get_post_thumbnail_url('medium'); ?> " /> <div class="<?php echo has_category('sponsored') ? 'sponsored-content-container' : ''; ?> "> <h3><?php echo one_of(simple_fields_fieldgroup('short_title'), get_the_title()); ?> </h3> <?php if (has_category('sponsored')) { ?> <p class="sponsored-content">Sponsored</p> <?php
<div class="index_showbox"> <?php $sticky = get_option('sticky_posts'); rsort($sticky); query_posts(array('post__in' => $sticky, 'caller_get_posts' => 1, 'showposts' => dopt('d_sticky_count') ? dopt('d_sticky_count') : 1)); while (have_posts()) { the_post(); $str_src = get_post_thumbnail_url('full'); echo '<div class="index_showbox_content"><a class="index_showbox_content_img" href="' . get_permalink() . '" title="' . get_the_title() . '" >'; echo '<img src="' . $str_src . '" />'; echo '</a><div class="index_showbox_content_tit"><h2 class="index_showbox_content_tit_h2"><a href="' . get_permalink() . '" title="' . get_the_title() . '" >' . get_the_title() . '</a></h2><p class="index_showbox_content_p">' . deel_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 190, '...') . '<span class="index_showbox_p_more"></span></p></div>'; echo '</div>'; } wp_reset_query(); ?> </div>
</a></h1> </div> </div> <div style="margin-top:100px" class="tidy-g gallery-wall"> <?php $myposts = get_posts('numberposts=10&orderby=post_date&order=DESC'); $postCount = count($myposts); if ($postCount > 4) { $postCount = 4; } $current_url = home_url(add_query_arg(array(), $wp->request)); for ($i = 0; $i < $postCount; $i++) { // print_r($myposts[$i]); if ($myposts[$i]->post_status == 'publish') { $image = get_post_thumbnail_url($myposts[$i]->ID); echo "<div ref=\"" . $myposts[$i]->guid . "\" class=\"tidy-u-1-4\" style=\"min-height:200px;background: transparent url('{$image}') repeat scroll center center!important;\"><a href=\"" . $myposts[$i]->guid . "\"></a></div>"; } } ?> </div> </section> <script type="text/javascript"> $(document).ready(function(){ $('.promos .news-mo li').click(function(){ window.location.href=$(this).attr('ref'); }); $('.gallery-heading').css('margin-top','0px'); $('.gallery-wall').css('margin-top','0px');