本文整理汇总了PHP中roots_title函数的典型用法代码示例。如果您正苦于以下问题:PHP roots_title函数的具体用法?PHP roots_title怎么用?PHP roots_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了roots_title函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: roots_title
<h1>
<?php
echo roots_title();
?>
</h1>
示例2: roots_title
<!--<div class="page-header">
<h1>
<?php echo roots_title(); ?>
</h1>
</div>
-->
示例3: wp_get_attachment_url
<?
if(is_page()){
$url = wp_get_attachment_url( get_post_thumbnail_id($post_id) );
?>
<div class="page-head-container">
<? if ( $url) { ?>
<img class="img-responsive" src="<? echo $url ?>" />
<? } else { ?>
<div class="no-featured-img "></div>
<? } ?>
<?
$template_name = get_post_meta( $post->ID, '_wp_page_template', true );
if ($template_name!='template-promo.php'){?>
<div class="page-title"><h2><?=roots_title(); ?></h2></div>
<? } ?>
</div>
<?
}
/*else if(is_tax()){
//if it's a collection page
global $wp_query;
$term = $wp_query->get_queried_object();
$title = $term->name;*/
?>
<!-- <div class="collection-head-container">
<a href="/collections">< Back to all collections</a>
<div class="page-title"><h2><?=$title; ?></h2></div>
</div> -->
<?
示例4: get_template_part
<?php
get_template_part('templates/head');
?>
<body <?php
body_class();
?>
>
<?php
$string = roots_title();
function seoUrl($string)
{
//Lower case everything
$string = strtolower($string);
//Make alphanumeric (removes all other characters)
$string = preg_replace("/[^a-z0-9_\\s-]/", "", $string);
//Clean up multiple dashes or whitespaces
$string = preg_replace("/[\\s-]+/", " ", $string);
//Convert whitespaces and underscore to dash
$string = preg_replace("/[\\s_]/", "-", $string);
return $string;
}
?>
<!-- Begin comScore Inline Tag 1.1302.13 -->
<script type="text/javascript">
// <![CDATA[
function udm_(e){var t="comScore=",n=document,r=n.cookie,i="",s="indexOf",o="substring",u="length",a=2048,f,l="&ns_",c="&",h,p,d,v,m=window,g=m.encodeURIComponent||escape;if(r[s](t)+1)for(d=0,p=r.split(";"),v=p[u];d<v;d++)h=p[d][s](t),h+1&&(i=c+unescape(p[d][o](h+t[u])));e+=l+"_t="+ +(new Date)+l+"c="+(n.characterSet||n.defaultCharset||"")+"&c8="+g(n.title)+i+"&c7="+g(n.URL)+"&c9="+g(n.referrer),e[u]>a&&e[s](c)>0&&(f=e[o](0,a-8).lastIndexOf(c),e=(e[o](0,f)+l+"cut="+g(e[o](f+1)))[o](0,a)),n.images?(h=new Image,m.ns_p||(ns_p=h),h.src=e):n.write("<","p","><",'img src="',e,'" height="1" width="1" alt="*"',"><","/p",">")};