当前位置: 首页>>代码示例>>PHP>>正文


PHP short_title函数代码示例

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


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

示例1: eff_latest_videos_sc


//.........这里部分代码省略.........
						    <img src="<?php 
                echo eff_post_image();
                ?>
" width="125" height="93" alt="<?php 
                the_title();
                ?>
" title="<?php 
                the_title();
                ?>
" />
						
						<?php 
            } else {
                ?>
						    <img src="<?php 
                echo $Fimg;
                ?>
"  alt="<?php 
                the_title();
                ?>
" title="<?php 
                the_title();
                ?>
" />
						<?php 
            }
            ?>
					    </a>
					</div>
					<h2><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            short_title(40);
            ?>
</a></h2>
					<span class="post_meta"><?php 
            the_time('F d, Y');
            ?>
</span>	
				    </div>
				    <?php 
        }
    } else {
        ?>
				    <!--else here-->
				    <?php 
    }
    ?>
				    <?php 
    wp_reset_query();
    ?>
				</div>
			    </div>
			</div>
		    </section>
		</div>
		<!--Crousel-->
		<script>
		    jQuery(document).ready(function($) {
			//latest vids wrap
			var vids = $(".lv_item");
			for(var i = 0; i < vids.length; i+=4) {
			  vids.slice(i, i+4).wrapAll('<div class="four_items"></div>');
			}
			//Crousel Style1
开发者ID:abdulhadikaryana,项目名称:kebudayaan,代码行数:67,代码来源:eff_sc.php

示例2: WP_Query

    $query = new WP_Query($args);
    while ($query->have_posts()) {
        $query->the_post();
        echo '<div class="sticky-post">';
        echo '<div class="cat-title">';
        echo '<p><a href="' . get_category_link(2) . '">News</a></p>';
        echo '</div>';
        echo '<a href="' . esc_url(get_permalink()) . '" class="visible-lg">';
        the_post_thumbnail('medium-width');
        echo '</a>';
        echo '<a href="' . esc_url(get_permalink()) . '" class="hidden-lg">';
        the_post_thumbnail('full-width');
        echo '</a>';
        echo '<div class="description">';
        echo '<div class="title">';
        echo '<a href="' . esc_url(get_permalink()) . '">' . short_title("...", 8) . '</a>';
        echo '</div>';
        echo '<small class="author"><i>';
        the_author();
        echo '</i></small>';
        echo '<small class="date"><i>';
        the_time('F j, Y');
        echo '</i></small>';
        custom_excerpt('semi_medium_excerpt_length', 'ellipsis');
        echo '<a href="' . esc_url(get_permalink()) . '" class="readmore text-center">Read More ›</a>';
        echo '</div>';
        echo '</div>';
    }
    wp_reset_query();
}
?>
开发者ID:johnreytepacia,项目名称:etarticles,代码行数:31,代码来源:index.php

示例3: the_permalink

        }
        ?>

        <h2> 
          <a href="<?php 
        the_permalink();
        ?>
" id="post-<?php 
        the_ID();
        ?>
" title="<?php 
        printf(__('%s', 'max-magazine'), the_title_attribute('echo=0'));
        ?>
" rel="bookmark">
           <?php 
        echo short_title($get_the_ID);
        ?>
 
          </a>

        </h2>

        <div class="post-meta"  >
          <span class='views'>
          <?php 
        echo '<strong>' . get_PostViews(get_the_ID()), '</strong> &nbsp;Visualizzazioni' . '';
        ?>
          </span>  
        </div>
      </div><!--right-->
  </div><!--post image-->
开发者ID:agileontheweb,项目名称:xvp,代码行数:31,代码来源:10-20min.php

示例4: get_post_meta

$project_url = get_post_meta($post->ID, 'themnific_project_url', true);
$project_description = get_post_meta($post->ID, 'themnific_project_description', true);
?>

            
            <div class="item_carousel item_height2">
        
                <div class="imgwrap">
                
                        <div class="cats2">
    
                			<h3><a href="<?php 
the_permalink();
?>
"><?php 
echo short_title('...', 8);
?>
</a></h3>
                
                			<?php 
$terms_of_post = get_the_term_list($post->ID, 'categories', '', ' &bull; ', ' ', '');
echo $terms_of_post;
?>

						
                        </div>
                        
                        <a href="<?php 
the_permalink();
?>
">
开发者ID:DavidSalzer,项目名称:cambium-site,代码行数:31,代码来源:folio-carousel.php

示例5: the_post_thumbnail

" >
       
          <?php 
    the_post_thumbnail('mag', array('class' => "grayscale grayscale-fade"));
    ?>
          
       </a>
       
  <?php 
}
?>
      
  <h4><a href="<?php 
tmnf_permalink();
?>
" title="<?php 
the_title();
?>
"><?php 
echo tmnf_icon();
?>
 <?php 
echo short_title('...', 12);
?>
</a></h4>
  
  <?php 
tmnf_meta_date();
?>

</div>
开发者ID:xiang-chen-git,项目名称:LeanBlog,代码行数:31,代码来源:featured-post.php

示例6: query_posts

?>
</h2>
                        </div>
                        <ul>
                            <?php 
query_posts(array('showposts' => 10));
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
                            <li>
                                <a href="<?php 
        the_permalink();
        ?>
"><?php 
        short_title(40);
        ?>
</a>
                            </li>
                            <?php 
    }
    ?>
                            <?php 
} else {
    ?>
                            <!-- Else in here -->
                            <?php 
}
?>
                            <?php 
wp_reset_query();
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:404.php

示例7: mom_ajax_search

function mom_ajax_search()
{
    // stay away from bad guys
    $nonce = $_POST['nonce'];
    if (!wp_verify_nonce($nonce, 'ajax-nonce')) {
        die('Nope!');
    }
    $posts_query = new WP_Query(array('s' => $_POST['term'], 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 5));
    if ($posts_query->have_posts()) {
        ?>
<h4 class="search-results-title"><?php 
        _e('Posts', 'framework');
        ?>
</h4>
<?php 
        // The Loop
        while ($posts_query->have_posts()) {
            $posts_query->the_post();
            ?>
<a href="<?php 
            the_permalink();
            ?>
" <?php 
            post_class('ajax-search-item');
            ?>
>
<?php 
            if (mom_post_image() != false) {
                mom_post_image_full('search-thumb');
            } else {
                ?>
<span class="post_format"></span>
<?php 
            }
            if (is_rtl()) {
                ?>
<h2><?php 
                short_title(30);
                ?>
</h2>
<?php 
            } else {
                ?>
<h2><?php 
                short_title(25);
                ?>
</h2>
<?php 
            }
            ?>
<span><?php 
            the_time('F j, Y');
            ?>
</span>
</a>
<?php 
        }
        //end while
    }
    wp_reset_postdata();
    $pages_query = new WP_Query(array('s' => $_POST['term'], 'post_type' => 'page', 'post_status' => 'publish', 'posts_per_page' => 5));
    if ($pages_query->have_posts()) {
        ?>
<h4 class="search-results-title"><?php 
        _e('Pages', 'framework');
        ?>
</h4>
<?php 
        // The Loop
        while ($pages_query->have_posts()) {
            $pages_query->the_post();
            ?>
<a href="<?php 
            the_permalink();
            ?>
" <?php 
            post_class('ajax-search-item');
            ?>
>
<?php 
            if (mom_post_image() != false) {
                mom_post_image_full('search-thumb');
            } else {
                ?>
<span class="post_format"></span>
<?php 
            }
            if (is_rtl()) {
                ?>
<h2><?php 
                short_title(30);
                ?>
</h2>
<?php 
            } else {
                ?>
<h2><?php 
                short_title(25);
                ?>
</h2>
//.........这里部分代码省略.........
开发者ID:justinwool,项目名称:vortago,代码行数:101,代码来源:ajax-full.php

示例8: widget


//.........这里部分代码省略.........
" width="50" height="50" alt="<?php 
                            the_title();
                            ?>
" title="<?php 
                            the_title();
                            ?>
" />
				
				<?php 
                        } else {
                            ?>
				    <img src="<?php 
                            echo $ntImage;
                            ?>
"  alt="<?php 
                            the_title();
                            ?>
" title="<?php 
                            the_title();
                            ?>
" />
				<?php 
                        }
                        ?>
			    <?php 
                    }
                    ?>
			</a>
			</div>
			    <h2><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    short_title(35);
                    ?>
</a></h2>
			    <span class="post_meta"><?php 
                    the_time('F d, Y');
                    ?>
<a href="<?php 
                    the_permalink();
                    ?>
" class="comments"><?php 
                    comments_number('(0) Comments', '(1) Comment', '(%) Comments');
                    ?>
</a></span>
		</li>

		<?php 
                }
                ?>
		<?php 
            } else {
                ?>
		<!-- Else in here -->
		<?php 
            }
            ?>
		<?php 
            wp_reset_query();
            ?>
		</ul>
<?php 
        } elseif ($orderby == 'Random') {
            ?>
		<ul class="post_list">
开发者ID:abdulhadikaryana,项目名称:kebudayaan,代码行数:67,代码来源:posts-widget.php

示例9: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = $instance['title'];
        $post_type = 'all';
        $categories = $instance['categories'];
        $posts = $instance['posts'];
        echo $before_widget;
        ?>

		
		<?php 
        $post_types = get_post_types();
        unset($post_types['page'], $post_types['attachment'], $post_types['revision'], $post_types['nav_menu_item']);
        if ($post_type == 'all') {
            $post_type_array = $post_types;
        } else {
            $post_type_array = $post_type;
        }
        ?>


			<h2 class="widget widget-single inn"><a href="<?php 
        echo esc_url(get_category_link($categories));
        ?>
"><?php 
        echo esc_html($title);
        ?>
</a></h2>
			
			<?php 
        $recent_posts = new WP_Query(array('showposts' => $posts, 'cat' => $categories));
        ?>

            <ul>
			<?php 
        while ($recent_posts->have_posts()) {
            $recent_posts->the_post();
            ?>


			<li class="fblock">
                    
					<?php 
            if (has_post_thumbnail()) {
                ?>

                         <a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
" >
                         <?php 
                the_post_thumbnail('tabs', array('title' => ""));
                ?>

                         </a>
                    <?php 
            }
            ?>

                        
                    <h3><a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            the_title();
            ?>
"><?php 
            echo tmnf_icon();
            ?>
 <?php 
            echo short_title('...', 11);
            ?>
</a></h3>
                    <p class="meta">
                    
                    	<?php 
            the_time(get_option('date_format'));
            ?>
 &bull; <?php 
            comments_popup_link(__('Comments (0)', 'themnific'), __('Comments (1)', 'themnific'), __('Comments (%)', 'themnific'));
            ?>

                    
                    </p>
                        
			</li>

			<?php 
        }
        ?>

			</ul>

		
		<?php 
        echo $after_widget;
//.........这里部分代码省略.........
开发者ID:DavidSalzer,项目名称:cambium-site,代码行数:101,代码来源:widget-featured.php

示例10: widget


//.........这里部分代码省略.........
                    echo eff_post_image();
                    ?>
" width="85" height="68" alt="<?php 
                    the_title();
                    ?>
" title="<?php 
                    the_title();
                    ?>
" />
							    
							    <?php 
                } else {
                    ?>
								<img src="<?php 
                    echo $ntImage;
                    ?>
"  alt="<?php 
                    the_title();
                    ?>
" title="<?php 
                    the_title();
                    ?>
" />
							    <?php 
                }
                ?>
							</a>
							</div>
						    </div>
						    <h2><a href="<?php 
                the_permalink();
                ?>
"><?php 
                short_title(50);
                ?>
</a></h2>
						    <span class="post_meta"><?php 
                the_time('F d, Y');
                ?>
<a href="<?php 
                the_permalink();
                ?>
" class="comments"><?php 
                comments_number('(0) Comments', '(1) Comment', '(%) Comments');
                ?>
</a></span></span>
						</li>
						<?php 
            }
            ?>
						<?php 
        } else {
            ?>
						<!-- Else in here -->
						<?php 
        }
        ?>
						<?php 
        wp_reset_query();
        ?>
					    </ul>
					</div>
				</div>
				
				<div id="tab_recent" class="tabs_widget_content">
					<div>
开发者ID:abdulhadikaryana,项目名称:kebudayaan,代码行数:67,代码来源:tabbed-widget.php

示例11: array

<div id="da-slider" class="da-slider">
<?php 
$args = array('post_type' => 'product', 'posts_per_page' => 10, 'product_cat' => 'Appliances', 'orderby' => 'rand');
$loop = new WP_Query($args);
while ($loop->have_posts()) {
    $loop->the_post();
    global $product;
    ?>

	<div class="da-slide">
		<h2><?php 
    echo short_title('...', 3);
    ?>
</h2>
		<p><?php 
    echo apply_filters('woocommerce_short_description', $post->post_excerpt);
    ?>
</p>
		<a class="da-link" href="<?php 
    echo get_permalink($loop->post->ID);
    ?>
" title="<?php 
    echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID);
    ?>
">더보기</a>
		<div class="da-img woocommerce">
			<?php 
    woocommerce_show_product_sale_flash($post, $product);
    ?>
      <?php 
    if (has_post_thumbnail($loop->post->ID)) {
开发者ID:ChloeKim,项目名称:WP_Theme_Dev,代码行数:31,代码来源:cslider-content.php

示例12: esc_url

<?php 
/*
 * Default Template For Post
 */
echo '<div class="col-md-5">';
echo '<a href="' . esc_url(get_permalink()) . '" class="visible-lg visible-lg2">';
the_post_thumbnail('square-thumbnail');
echo '</a>';
echo '<a href="' . esc_url(get_permalink()) . '" class="hidden-lg hidden-lg2">';
the_post_thumbnail('full-width');
echo '</a>';
echo '</div>';
echo '<div class="col-md-7 alm-content">';
echo '<div class="content">';
echo '<h2 class="entry-title">
		<a href="' . esc_url(get_permalink()) . '">' . short_title("...", 15) . '</a></h2>';
?>
		
		<?php 
echo '<small class="author"><i>';
the_author();
echo '</i></small>';
?>
		<!--/ The Date -->
		<small class="date" style="margin-left:-4px;">
        <i>
		<?php 
the_time('F j, Y');
?>
        </i>
		</small>
开发者ID:johnreytepacia,项目名称:etarticles,代码行数:31,代码来源:default.php

示例13: WP_Query

</p>
            <ul>    
                <?php 
    $query = new WP_Query(array('posts_per_page' => $count, 'post__in' => $db_posts, 'orderby' => 'post__in', 'no_found_rows' => true, 'cache_results' => false, 'ignore_sticky_posts' => 1));
    update_post_thumbnail_cache($query);
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            ?>
                <li itemscope="" itemtype="http://schema.org/Article">
                    <a href="<?php 
            the_permalink();
            ?>
" itemprop="url">
                    <h2 itemprop="name"><?php 
            short_title(47);
            ?>
</h2>
                    <div class="entry-meta">
                        <time class="entry-date" datetime="<?php 
            the_time('c');
            ?>
" itemprop="dateCreated"><?php 
            the_time('Y/m/d');
            ?>
</time>
                        <div class="author-link">
                            <?php 
            _e('by ', 'framework');
            ?>
<a itemprop="author" href="<?php 
开发者ID:justinwool,项目名称:vortago,代码行数:31,代码来源:category-slider.php

示例14: eff_news_box


//.........这里部分代码省略.........
                    echo eff_post_image();
                    ?>
" width="277" height="153" alt="<?php 
                    the_title();
                    ?>
" title="<?php 
                    the_title();
                    ?>
" />
					    
					    <?php 
                } else {
                    ?>
						<img itemprop="image" src="<?php 
                    echo $Fimg;
                    ?>
"  alt="<?php 
                    the_title();
                    ?>
" title="<?php 
                    the_title();
                    ?>
" />
					    <?php 
                }
                ?>
                                        </a>
                                    </div>
                                    <h2 itemprop="name"><a href="<?php 
                the_permalink();
                ?>
" itemprop="url" rel="bookmark"><?php 
                if ($tl == true) {
                    short_title($tl);
                } else {
                    the_title();
                }
                ?>
</a></h2>
                                    <span class="post_meta"><?php 
                the_time($dateformat);
                if ($hpcomment == true) {
                    ?>
<a href="<?php 
                    the_permalink();
                    ?>
" class="comments"><?php 
                    comments_number('(0) Comments', '(1) Comment', '(%) Comments');
                    ?>
</a><?php 
                }
                ?>
				    <meta itemprop="interactionCount" content="<?php 
                comments_number('UserComments: 0', 'UserComments: 1', 'UserComments: %');
                ?>
">
				    <?php 
                $rt_enable = get_post_meta($post->ID, 'eff_enable_review', true);
                $rt_style = get_post_meta($post->ID, 'eff_review_style', true);
                $percent_score = get_post_meta($post->ID, 'eff_rt_final_score', true);
                $points_score = get_post_meta($post->ID, 'eff_rt_final_score_po', true);
                $stars_score = get_post_meta($post->ID, 'eff_rt_final_score_stars', true);
                if ($rt_enable) {
                    if ($rt_style == 'stars') {
                        echo '<span class="rt_nb_rev rt_nb_star"><span class="rt_stars_post" title="' . $percent_score . '%">
							  <span class="rt_stars_post_rate" style="width:' . $percent_score . '%;"></span>
开发者ID:abdulhadikaryana,项目名称:kebudayaan,代码行数:67,代码来源:eff_loop.php

示例15: mom_feature_slider


//.........这里部分代码省略.........
                    }
                }
            } else {
                ?>
										            <?php 
            }
            ?>
										            <?php 
            wp_reset_postdata();
            ?>
								
										        </div>	
										
									        <div class="cat-slider-nav">
									            <ul>    
									                <?php 
            $query = new WP_Query(array('post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $number_of_posts, 'orderby' => 'post__in', 'no_found_rows' => true, 'cache_results' => false, 'post__in' => $parent_posts));
            if ($query->have_posts()) {
                while ($query->have_posts()) {
                    $query->the_post();
                    if ($unique_posts) {
                        $do_unique_posts[] = get_the_ID();
                    }
                    ?>
									                <?php 
                    if (mom_post_image() != false) {
                        ?>
									                <li itemscope="" itemtype="http://schema.org/Article">
									                    <a href="<?php 
                        the_permalink();
                        ?>
" itemprop="url">
									                    <h2 itemprop="name"><?php 
                        short_title(47);
                        ?>
</h2>
									                    <div class="entry-meta">
									                        <time class="entry-date" datetime="<?php 
                        the_time('c');
                        ?>
" itemprop="dateCreated"><?php 
                        the_time('Y/m/d');
                        ?>
</time>
									                        <div class="author-link">
									                            <?php 
                        _e('by ', 'framework');
                        ?>
<a itemprop="author" href="<?php 
                        echo get_author_posts_url(get_the_author_meta('ID'));
                        ?>
" rel="author"><?php 
                        echo get_the_author();
                        ?>
</a>
									                        </div>
									                    </div>
									                    </a>
									                </li>
									                <?php 
                    }
                    ?>
								                <?php 
                }
            } else {
                ?>
开发者ID:justinwool,项目名称:vortago,代码行数:67,代码来源:feature-slider.php


注:本文中的short_title函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。