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


PHP Titles\title函数代码示例

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


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

示例1:

      	<ul>
      		<li><a href="#">Link</a></li>
      		<li><a href="#">Blog</a></li>
      		<li><a href="#">Other</a></li>
      		<li><a href="#">Maria</a></li>
      	</ul>

        <div class="socialmedia">
          <ul>
            <li><a href="#"><img src="http://127.0.0.1/wordpress/wp-content/uploads/2015/12/socialmedia-011.png"/></a></li>
            <li><a href="#"><img src="http://127.0.0.1/wordpress/wp-content/uploads/2015/12/socialmedia-021.png"/></a></li>
            <li><a href="#"><img src="http://127.0.0.1/wordpress/wp-content/uploads/2015/12/socialmedia-031.png"/></a></li>
            <li><a href="#"><img src="http://127.0.0.1/wordpress/wp-content/uploads/2015/12/socialmedia-041.png"/></a></li>
            <li><a href="#"><img src="http://127.0.0.1/wordpress/wp-content/uploads/2015/12/socialmedia-051.png"/></a></li>
            <li><a href="#"><img src="http://127.0.0.1/wordpress/wp-content/uploads/2015/12/socialmedia-061.png"/></a></li>
          </ul>
        </div><!--ends .socialmedia-->
      </div><!--ends secondarynav-container-->
    </div><!--ends .secondarynav-->

    <div id="redline2"><p> </p>
    </div><!--ends .redline2-->

  
  <h1><?php 
echo Titles\title();
?>
</h1>
</div><!--ends page-header-->

开发者ID:msoroeta,项目名称:theme-name,代码行数:29,代码来源:blog-header.php

示例2: elseif

<?php

use Roots\Sage\Titles;
?>

<?php 
if (has_post_thumbnail() && !is_archive() && !is_home()) {
    $thumb_id = get_post_thumbnail_id();
    $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'large', true);
    $thumb_url = $thumb_url_array[0];
    $header_type = 'hero';
    $bg_size = 'cover';
    $scroll_reveal = 'scroll-reveal';
} elseif (get_post_meta($post->ID, 'hero', true) == 1) {
    $thumb_url = get_theme_mod('site_image');
    $header_type = 'hero';
    $bg_size = 'cover';
    $scroll_reveal = 'scroll-reveal';
} else {
    $header_type = 'no-hero';
    $scroll_reveal = null;
    $thumb_url = null;
    $bg_size = null;
}
echo '<div class="page-header ' . $header_type . '" data-parallax="scroll" data-image-src="' . $thumb_url . '"' . ' style="background-size: ' . $bg_size . '">';
echo '<div class="' . $scroll_reveal . '">';
echo '<h1 class="header">' . Titles\title() . '</h1>';
echo '</div>';
echo '</div>';
开发者ID:jeffsee55,项目名称:ntbcapital.com,代码行数:29,代码来源:page-header.php

示例3:

                            <?php 
            $parentTitle = get_the_title($parentPage) == '' ? '...' : get_the_title($parentPage);
            ?>
                            <a href="<?php 
            echo get_permalink($parentPage);
            ?>
"><?php 
            echo $parentTitle;
            ?>
</a>
                        </li>
                    <?php 
        }
        ?>
                    <li class="active"><?php 
        echo get_the_title();
        ?>
</li>
                </ol>

            </div>
        <?php 
    }
    ?>
        <h1><?php 
    echo esc_html(Titles\title());
    ?>
</h1>
    </div>
<?php 
}
开发者ID:sinaru,项目名称:Sonder-WordPress-Theme,代码行数:31,代码来源:page-header.php

示例4:

<?php use Roots\Sage\Titles; ?>

<div class="page-header">
  <!-- <h1><?= Titles\title(); ?></h1> -->
</div>
开发者ID:RechadS,项目名称:rtm,代码行数:5,代码来源:page-header.php

示例5: isset

<?php

use Roots\Sage\Titles;
/**
 * 		Homepage Slider
 * // javascript in _main.js 
 */
global $wp_query, $post, $panel_error_message;
global $meta;
?>

<?php 
$postId = get_the_ID();
$meta = get_post_custom($postId);
//in de footer extra enfotmatie over de rest van de onderneming
$extra_title = isset($meta['wpcf-extra-titel'][0]) ? $meta['wpcf-extra-titel'][0] : Titles\title();
$extra_content = isset($meta['wpcf-features-extra-regel-tekst'][0]) ? $meta['wpcf-features-extra-regel-tekst'][0] : "";
if (has_post_thumbnail()) {
    $HeaderImage = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
} else {
    $HeaderImage = get_template_directory_uri() . '/dist/images/default_header.jpg';
}
?>

<div class="header-holder">
			
	<div id="imageHeader" class="imageHeader" style="background-image: url(<?php 
echo $HeaderImage;
?>
); ">
		<div class="container"> 
开发者ID:hphioolen,项目名称:grimex_theme,代码行数:31,代码来源:featured-image.php

示例6:

<?php

use Roots\Sage\Titles;
?>

<div class="page-header">
  <h1><?php 
echo Titles\title() . '<br><small>' . get_post_meta($post->ID, 'subtitle', true) . '</small>';
?>
</h1>
</div>
开发者ID:jbradach,项目名称:materialboot,代码行数:11,代码来源:page-header.php


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