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


PHP the_subtitle函数代码示例

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


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

示例1: eps_add_input

 function eps_add_input()
 {
     global $post_ID, $post;
     if (!in_array($post->post_type, array('post'))) {
         return;
     }
     $eps_subtitle = the_subtitle($post_ID);
     $eps_show_label = strlen(esc_attr($eps_subtitle)) ? ' style="display:none;"' : '';
     echo '<div><div id="eps_subtitle">
             <label' . $eps_show_label . '>' . __('Enter subtitle here') . '</label><input type="text" class="eps_subtitle" name="eps_subtitle" value="' . esc_attr($eps_subtitle) . '" />
         </div></div>
         <script>
             var html = jQuery("#eps_subtitle").parent("div").html();
             jQuery("#eps_subtitle").parent("div").remove();
             jQuery("#titlediv").after( html );
         </script>';
 }
开发者ID:selinaross,项目名称:spring-ridge,代码行数:17,代码来源:easy-post-subtitle.php

示例2: cleanblog_header

    /**
     * Custom header codes for the home page, single posts and pages
     */
    function cleanblog_header()
    {
        ?>

	<?php 
        if (is_single()) {
            ?>
	
    <!-- Page Header -->
    <!-- Set your background image for this header on the line below. -->
	<?php 
            $feat_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
            ?>
    <header class="intro-header" style="background-color: #404040; background-image: url('<?php 
            echo $feat_image;
            ?>
')">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="post-heading">
                        <h1><?php 
            single_post_title();
            ?>
</h1>
			<?php 
            if (function_exists('the_subtitle')) {
                the_subtitle('<h2 class="subheading">', '</h2>');
            }
            ?>
                        <span class="meta"><?php 
            cleanblog_posted_on();
            ?>
</span>
                    </div>
                </div>
            </div>
        </div>
    </header>
	
	<?php 
        } elseif (is_page()) {
            ?>
	
    <!-- Page Header -->
    <!-- Set your background image for this header on the line below. -->
	<?php 
            $feat_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
            ?>
    <header class="intro-header" style="background-color: #404040; background-image: url('<?php 
            echo $feat_image;
            ?>
')">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="site-heading">
                        <h1><?php 
            single_post_title();
            ?>
</h1>
                        <hr class="small">
			<?php 
            if (function_exists('the_subtitle')) {
                the_subtitle('<span class="subheading">', '</span>');
            }
            ?>
                    </div>
					<!-- /.site-heading -->
                </div>
				<!-- /.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1 -->
            </div>
			<!-- /.row -->
        </div>
		<!-- /.container -->
    </header>
	
	<?php 
        } elseif (is_search()) {
            ?>
	
    <!-- Page Header -->
    <!-- Set your background image for this header on the line below. -->
    <header class="intro-header" style="background-color: #404040;')">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="site-heading">
                        <h1><?php 
            esc_html_e('Search Results', 'cleanblog');
            ?>
</h1>
                        <hr class="small">
                        <span class="subheading"><?php 
            printf(esc_html__('You searched for: "%s"', 'cleanblog'), '<span>' . get_search_query() . '</span>');
            ?>
</span>
//.........这里部分代码省略.........
开发者ID:alesanchezr,项目名称:personal-blog,代码行数:101,代码来源:template-tags.php

示例3: the_title

            the_title();
            ?>
</a>
							<?php 
        } else {
            ?>
							<h1 class="section-title"><?php 
            the_title();
            ?>
</h1>
							<?php 
        }
        ?>
							<?php 
        if (function_exists('the_subtitle')) {
            the_subtitle('<p class="subtitle">', '</p>');
        }
        ?>
	
							</header>
								<?php 
        $posttags = get_the_tags();
        ?>
								<?php 
        if (get_the_tag_list()) {
            echo get_the_tag_list('<div class="slide-txt"><ul class="tag_list"><li>', ',</li><li>', '</li></ul></div>');
        }
        ?>
								
								<?php 
        the_content();
开发者ID:peternem,项目名称:new-cc,代码行数:31,代码来源:archive.php

示例4: wp_get_attachment_image_src

	<?php 
$featured_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'header-article');
?>

	<header class="entry-header">
	
		<div class="opacity-filter"></div>

		<img alt="Lufthansa_01" class="attachment-post-thumbnail wp-post-image" src="<?php 
echo $featured_image[0];
?>
" />

		<div class="entry-headline">
			<?php 
the_subtitle('<h1 class="entry-subtitle">', '</h1>');
the_title('<h1 class="entry-title">', '</h1>');
?>
		</div><!--.entry-headline -->
	</header> <!--.entry-header -->

	<div class="head-overview"></div>
	<div class="entry-overview">
		<div class="entry-teaser teaser-column">
			<h3 class="block-title">OVERVIEW</h3>

			<?php 
the_excerpt('<p class="entry-excerpt">', '</p>');
?>
		</div><!-- .entry-teaser -->
开发者ID:Bolixe,项目名称:Wordpress,代码行数:30,代码来源:content-collective.php

示例5: WP_Query

$front_page = new WP_Query(array('post_type' => 'page', 'posts_per_page' => 1, 'meta_key' => 'front_page', 'meta_value' => '1'));
?>
<section class="home-article">
    <div class="inner">
        <?php 
while ($front_page->have_posts()) {
    $front_page->the_post();
    ?>
        <article <?php 
    post_class();
    ?>
>
            <header class="article-header">
                <?php 
    the_subtitle('<span class="subtitle">', '</span>');
    ?>
                <?php 
    the_title('<h1>', '</h1>');
    ?>
    
            </header>
            <div class="article-content">
                <?php 
    the_excerpt();
    ?>
            </div>
            <a href="<?php 
    the_permalink();
    ?>
" class="home-read-more">Læs mere
开发者ID:JeppeSigaard,项目名称:smamo16,代码行数:30,代码来源:home-article.php

示例6: cleanblog_header

    /**
     * Custom header codes for the home page, single posts and pages
     */
    function cleanblog_header()
    {
        ?>

	<?php 
        if (is_single()) {
            ?>
	
    <!-- Page Header -->
    <!-- Set your background image for this header on the line below. -->
	<?php 
            $feat_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
            ?>
    <header class="intro-header" style="background-color: <?php 
            echo get_theme_mod('cleanblog_header_background_color');
            ?>
; background-image: url('<?php 
            echo $feat_image;
            ?>
')">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="post-heading">
                        <h1><?php 
            single_post_title();
            ?>
</h1>
			<?php 
            if (function_exists('the_subtitle')) {
                the_subtitle('<h2 class="subheading">', '</h2>');
            }
            ?>
                        <span class="meta"><?php 
            cleanblog_posted_on();
            ?>
</span>
                    </div>
                </div>
            </div>
        </div>
    </header>
	
	<?php 
        } elseif (is_page_template('page-builder.php')) {
            ?>

	<?php 
        } elseif (is_page()) {
            ?>
	
    <!-- Page Header -->
    <!-- Set your background image for this header on the line below. -->
	<?php 
            $feat_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
            ?>
    <header class="intro-header" style="background-color: <?php 
            echo get_theme_mod('cleanblog_header_background_color');
            ?>
; background-image: url('<?php 
            echo $feat_image;
            ?>
')">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="site-heading">
                        <h1><?php 
            single_post_title();
            ?>
</h1>
                        <hr class="small">
			<?php 
            if (function_exists('the_subtitle')) {
                the_subtitle('<span class="subheading">', '</span>');
            }
            ?>
                    </div>
					<!-- /.site-heading -->
                </div>
				<!-- /.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1 -->
            </div>
			<!-- /.row -->
        </div>
		<!-- /.container -->
    </header>
	
	<?php 
        } elseif (is_search()) {
            ?>
	
    <!-- Page Header -->
    <!-- Set your background image for this header on the line below. -->
    <header class="intro-header" style="background-color: <?php 
            echo get_theme_mod('cleanblog_header_background_color');
            ?>
;')">
//.........这里部分代码省略.........
开发者ID:adambajumba,项目名称:cleanblog,代码行数:101,代码来源:template-tags.php

示例7: the_post_thumbnail

?>
	</div>

	<?php 
if (has_post_thumbnail()) {
    ?>
		<span class="testimonial-thumbnail">
			<?php 
    the_post_thumbnail('testimonial-thumb');
    ?>
		</span>
	<?php 
}
?>

	<header class="entry-header">
		<h3 class="entry-title"><?php 
the_title();
?>
</h3>
		<?php 
if (function_exists('the_subtitle')) {
    ?>
			<?php 
    the_subtitle('<p class="entry-subtitle">', '</p>');
    ?>
		<?php 
}
?>
	</header><!-- .entry-header -->
</article><!-- #post-## -->
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:31,代码来源:content-testimonial.php

示例8: wp_get_attachment_image_src

    <?php 
    $image_url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'thumbnail');
    ?>
    <div class="header-team-img" data-bg="<?php 
    echo $image_url[0];
    ?>
"></div>
<?php 
} elseif ('case' === get_post_type(get_the_ID())) {
    $terms = wp_get_post_terms(get_the_ID(), 'cases');
    ?>
    <span class="article-subtitle"><?php 
    if (!empty($terms)) {
        echo $terms[0]->name;
    }
    ?>
</span>
    <?php 
    the_title('<h1 class="article-title">', '</h1>');
} else {
    ?>
    <?php 
    if (has_subtitle()) {
        the_subtitle('<span class="article-subtitle">', '</span>');
    }
    ?>
    <?php 
    the_title('<h1 class="article-title">', '</h1>');
}
?>
</header>
开发者ID:JeppeSigaard,项目名称:smamo16,代码行数:31,代码来源:article-header.php

示例9: the_title

	        <?php 
    }
    ?>
	    </div>
	    <div class="col-md-8">
	        <header class="page-header">
	       		<h1><?php 
    the_title();
    ?>
</h1>
	        </header>
	        <?php 
    if (function_exists('the_subtitle')) {
        ?>
	        <p class="subtitle"><strong><?php 
        echo the_subtitle();
        ?>
</strong></p>
	        <?php 
    }
    ?>
 
	        <?php 
    the_content();
    ?>
	        <p>
				<a class="btn btn-default" role="button" href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title_attribute();
开发者ID:RoosterPark,项目名称:book-suite,代码行数:31,代码来源:index-welcome.php

示例10: the_permalink

featured-post<?php 
        }
        ?>
">
					
						<h4><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h4>

							<?php 
        if (function_exists('the_subtitle')) {
            the_subtitle('<div class="slide-txt"><p class="lead">', '</p></div>');
        }
        ?>
							<?php 
        $posttags = get_the_tags();
        ?>
							<?php 
        if (get_the_tag_list()) {
            echo get_the_tag_list('<div class="slide-txt"><ul class="tag_list"><li>', ',</li><li>', '</li></ul></div>');
        }
        ?>
							<?php 
        if (has_post_thumbnail()) {
            ?>
								<a href="<?php 
            the_permalink();
开发者ID:RoosterPark,项目名称:book-suite,代码行数:31,代码来源:archive.php

示例11: single_post_title

        <div class="main-head-holder">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="site-heading cta-header">
                    <?php 
if (is_single() || is_page()) {
    ?>
	                    <h1><?php 
    single_post_title();
    ?>
</h1>
						<?php 
    if (function_exists('the_subtitle')) {
        ?>
<hr class="small"><?php 
        the_subtitle('<p class="subheading">', '</p>');
    }
    ?>
					<?php 
} elseif (is_search()) {
    ?>
						<h1><?php 
    esc_html_e('Search Results', 'peacock');
    ?>
</h1>
                        <hr class="small">
                        <p class="subheading"><?php 
    printf(esc_html__('You searched for: "%s"', 'peacock'), '<span>' . get_search_query() . '</span>');
    ?>
</p>
					<?php 
开发者ID:ensarbaylar,项目名称:Peacock,代码行数:31,代码来源:header.php

示例12: wps_get_the_subtitle

/**
 * Query DB and echo page/post subtitle, if any
 *
 * @uses  WPSubtitle::_get_post_meta()
 *
 * @since  1.0
 * @deprecated  2.0  Use get_the_subtitle() instead.
 */
function wps_get_the_subtitle()
{
    _deprecated_function('wps_get_the_subtitle()', '2.0', 'the_subtitle()');
    the_subtitle();
}
开发者ID:olechka1505,项目名称:hungrylemur,代码行数:13,代码来源:deprecated.php

示例13: advps_slideshow


//.........这里部分代码省略.........
; -moz-opacity:<?php 
            echo $content['advps_overlay_opacity'];
            ?>
;filter:alpha(opacity=<?php 
            echo $content['advps_overlay_opacity'] * 100;
            ?>
);opacity:<?php 
            echo $content['advps_overlay_opacity'];
            ?>
;"></div>
        <div class="advps-excerpt-block-<?php 
            echo $template;
            ?>
" style="text-align:<?php 
            echo $content['advps_text_align'];
            ?>
;color:<?php 
            echo $content['advps_excptFcolor'];
            ?>
;-moz-opacity:<?php 
            echo $content['advps_text_opacity'];
            ?>
;filter:alpha(opacity=<?php 
            echo $content['advps_text_opacity'] * 100;
            ?>
);opacity:<?php 
            echo $content['advps_text_opacity'];
            ?>
;">    
<a href="<?php 
            the_permalink();
            ?>
"><h3 class="advs-sub-title"><?php 
            the_subtitle();
            ?>
</h3></a>    
        <<?php 
            echo $content['advps_ttitle_tag'];
            ?>
 class="advs-title" style="color:<?php 
            echo $content['advps_titleFcolor'];
            ?>
"><?php 
            if ($content['advps_ed_link'] == 'enable') {
                ?>
<a target="<?php 
                echo $content['advps_link_target'];
                ?>
" href="<?php 
                if ($content['advps_link_type'] == 'permalink') {
                    the_permalink();
                } else {
                    echo get_post_meta($post->ID, 'advps_custom_link', true);
                }
                ?>
" style="margin:5px 0px 10px 0px;color:<?php 
                echo $content['advps_titleFcolor'];
                ?>
" <?php 
                if (isset($content['advps_link_rel']) && $content['advps_link_rel'] != 'none') {
                    ?>
rel="<?php 
                    echo $content['advps_link_rel'];
                    ?>
"<?php 
                }
开发者ID:olechka1505,项目名称:hungrylemur,代码行数:67,代码来源:advanced-post-slider.php

示例14: the_title

/**
 * Template part to display the post/page header
 *
 * @package pgb
 */
?>

<div class="col-md-12">
	<?php 
if (is_single() || is_page()) {
    the_title('<h1 class="post-title">', '</h1>');
    the_subtitle('<h3 class="page-sub-title">', '</h3>');
} else {
    the_title('<h2 class="page-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h2>');
    the_subtitle('<h3 class="page-sub-title">', '</h3>');
}
?>
	<?php 
if ('post' == get_post_type()) {
    ?>
		<div class="entry-meta">
			<?php 
    pgb_posted_on();
    ?>
		</div><!-- .entry-meta -->
	<?php 
}
?>
</div>
开发者ID:nlk-sites,项目名称:nectar7,代码行数:29,代码来源:block-post_title.php

示例15: the_title

    if (is_review()) {
        echo 'Review';
    }
    ?>
</span>
				<h1><span <?php 
    if (is_review()) {
        echo 'itemprop="itemReviewed"';
    }
    ?>
><?php 
    the_title();
    ?>
</span></h1>
				<p class="subtitle"><?php 
    the_subtitle();
    ?>
</p>
				<?php 
    if (is_single()) {
        ?>
					<a href="<?php 
        echo get_author_posts_url(get_the_author_meta(null, $post->post_author));
        ?>
" class="author">
						<?php 
        the_avatar(64);
        ?>
						<span><?php 
        echo the_author_meta('display_name', $post->post_author);
        ?>
开发者ID:rd4k1,项目名称:Lewdism,代码行数:31,代码来源:header.php


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