本文整理汇总了PHP中the_archive_title函数的典型用法代码示例。如果您正苦于以下问题:PHP the_archive_title函数的具体用法?PHP the_archive_title怎么用?PHP the_archive_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了the_archive_title函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: issimple_page_header
/**
* Page Header
*
* @since IS Simple 1.0
* ----------------------------------------------------------------------------
*/
function issimple_page_header()
{
if (!is_single() || !is_front_page()) {
?>
<header id="page-header">
<div class="jumbotron">
<div class="container-fluid">
<?php
if (is_page()) {
the_title('<h1 id="page-title">', '</h1>');
edit_post_link(__('Edit', 'issimple'), '<span class="edit-link"><span class="glyphicon glyphicon-pencil"></span> ', '</span>');
} elseif (is_404()) {
?>
<h1 id="page-title"><?php
_e('Page not found', 'issimple');
?>
</h1><?php
} elseif (is_archive()) {
the_archive_title('<h1 id="page-title">', '</h1>');
if (is_author()) {
if (get_the_author_meta('description')) {
?>
<p id="author-bio">
<?php
get_template_part('author-info');
?>
</p><!-- #author-bio --><?php
}
} else {
the_archive_description('<div class="taxonomy-description">', '</div>');
}
} elseif (is_search()) {
?>
<h1 id="page-title"><?php
printf(__('Search results for: %s', 'issimple'), get_search_query());
?>
</h1><?php
} else {
?>
<h3 id="page-title" class="h1"><?php
_e('Latest Posts', 'issimple');
?>
</h1><?php
}
?>
</div>
</div>
</header><!-- #page-header --><?php
}
}
示例2: nexus_page_title
function nexus_page_title()
{
if (is_singular()) {
the_title();
} elseif (is_archive()) {
the_archive_title();
} elseif (is_search()) {
printf(esc_html__('Search Results for: %s', 'nexus'), '<span>' . get_search_query() . '</span>');
} elseif (is_404()) {
echo __('Page Not Found', 'nexus');
}
}
示例3: get_header
* @package WYSAC Wyoming Tobacco
*/
get_header();
?>
<div class="row">
<div id="primary" class="content-area">
<main id="main" class="site-main col-md-12" role="main">
<?php
if (have_posts()) {
?>
<header class="page-header col-md-12">
<?php
the_archive_title('', '</h1>');
//This has a filter, found in functions.php, that determines the formatting of the prefix. This also controls which .section-title appears above the archive the_archive_title
the_archive_description('<div class="taxonomy-description">', '</div>');
?>
<div class="taxonomy-description author-bio">
<?php
echo get_wp_user_avatar(get_the_author_meta('ID'), 96, 'left');
echo get_the_author_meta('description');
?>
</div>
<h2 class="widget-title" style="border:none;">Publications by <?php
echo get_the_author_meta('first_name');
?>
</h2>
</header><!-- .page-header -->
示例4: tamatebako_archive_header
/**
* Archive Header
* Display archive title and description.
* @since 0.1.0
* @access public
*/
function tamatebako_archive_header()
{
if (get_the_archive_title() && !is_front_page() && !is_singular() && !is_404()) {
?>
<header class="archive-header">
<?php
the_archive_title('<h1 class="archive-title">', '</h1>');
?>
<?php
the_archive_description('<div class="archive-description">', '</div>');
?>
</header><!-- .loop-meta -->
<?php
}
}
示例5: get_header
*/
get_header();
?>
<section class="main_content" role="main">
<div class="container">
<div class="row">
<div class="sub-heading">
<h1 class="text-center primary-heading"><?php
echo __('Архив', 'euzakupki');
?>
</h1>
<div class="sub-heading-sub">
<?php
the_archive_title('<span class="text-center center-block">', '</span>');
?>
<?php
the_archive_description('<span class="text-center">', '</span>');
?>
</div>
<div class="text-center">
<span class="divider" aria-hidden="true"><i class="glyphicon glyphicon-bullhorn"></i></span>
</div>
</div>
<div class="col-sm-8">
<?php
if (have_posts()) {
?>
示例6: get_header
*
* @package tm_polygon
*/
$tm_polygon_heading_image = Kirki::get_option('tm-polygon', 'page_bg_image');
$tm_polygon_layout = Kirki::get_option('tm-polygon', 'archive_layout');
get_header();
?>
<header class="big-title" style="background-image: url('<?php
echo esc_url($tm_polygon_heading_image);
?>
')">
<div class="container">
<div class="row middle">
<div class="col-md-6">
<?php
the_archive_title('<h1 class="entry-title">', '</h1>');
the_archive_description('<div class="taxonomy-description">', '</div>');
?>
</div>
<?php
if (function_exists('tm_bread_crumb')) {
?>
<div class="breadcrumb col-md-6 end">
<div class="container">
<?php
echo tm_bread_crumb(array('home_label' => Kirki::get_option('tm-polygon', 'site_general_breadcrumb_home_text')));
?>
</div>
</div>
<?php
}
示例7: get_header
*
* @package limitless-career
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
if (have_posts()) {
?>
<header class="page-header">
<?php
the_archive_title('<h1 class="page-title">', '</h1>');
the_archive_description('<div class="taxonomy-description">', '</div>');
?>
</header><!-- .page-header -->
<?php
/* Start the Loop */
?>
<?php
while (have_posts()) {
the_post();
?>
<?php
/*
* Include the Post-Format-specific template for the content.
示例8: get_header
* Archives template
*
* @package Modern
* @copyright 2015 WebMan - Oliver Juhas
*
* @since 1.0
* @version 1.2
*/
get_header();
?>
<section class="archives-listing">
<header class="page-header">
<?php
the_archive_title('<h1 class="page-title">', wm_paginated_suffix('small') . '</h1>');
the_archive_description('<div class="taxonomy-description">', '</div>');
?>
</header>
<?php
get_template_part('loop', 'archive');
?>
</section>
<?php
get_footer();
示例9: get_header
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package preschoolexpansion
*/
get_header();
?>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center" style="background: #f4f4f4;" class="container">
<?php
if (have_posts()) {
?>
<tr>
<?php
the_archive_title('<td><h1 class="page-title">', '</h1></td>');
the_archive_description('<td><div class="taxonomy-description">', '</div></td>');
?>
</tr>
<?php
/* Start the Loop */
?>
<?php
while (have_posts()) {
the_post();
?>
<?php
/*
* Include the Post-Format-specific template for the content.
示例10: elseif
?>
<?php
} elseif (is_year()) {
?>
<?php
printf(__('Yearly archives: %s', 'govintranet'), get_the_date('Y'));
?>
<?php
} else {
?>
<?php
$archiveTitle = post_type_archive_title('', false);
if ($archiveTitle != "") {
echo "<h1>" . $archiveTitle . "</h1>";
} else {
the_archive_title('<h1">', '</h1>');
the_archive_description('<div class="taxonomy-description">', '</div>');
}
?>
<?php
}
?>
</h1>
<?php
/* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
/* Run the loop for the archives page to output the posts.
示例11: elseif
} elseif (is_home() && is_front_page()) {
?>
<header id="page-header">
<div class="container">
<p id="page-title"><?php
echo apply_filters('upstart_blog_page_title', 'Recent posts');
?>
</p>
</div>
</header> <?php
} elseif (is_archive()) {
?>
<header id="page-header">
<div class="container">
<?php
the_archive_title('<p id="page-title">', '</p>');
?>
</div>
</header> <?php
} elseif (is_search()) {
?>
<header id="page-header">
<div class="container">
<p id="page-title">Search results for: <?php
_e(get_search_query());
?>
</p>
</div>
</header> <?php
} elseif (is_404()) {
?>
示例12: tha_content_top
?>
<main id="main" class="site-main" role="main" itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/CollectionPage">
<?php
tha_content_top();
// custom action hook
?>
<?php
if (have_posts()) {
?>
<header class="page-header">
<?php
the_archive_title('<h1 class="page-title" itemprop="headline">', '</h1>');
the_archive_description('<div class="taxonomy-description">', '</div>');
?>
</header><!-- .page-header -->
<?php
// Start the Loop
while (have_posts()) {
the_post();
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part('template-parts/content', get_post_format());
// End the loop.
}
示例13: get_header
/**
* Template Name: Category with player
*/
get_header('category');
?>
<section class="<?php
if (get_theme_mod('hide-player') == 0) {
echo "w-f-md";
}
?>
" id="ajax-container">
<section class="vbox">
<section class="scrollable padder-lg">
<header>
<?php
the_archive_title('<h1 class="font-thin h2 m-t m-b">', '</h1>');
the_archive_description('<div class="taxonomy-description">', '</div>');
?>
</header><!-- .page-header -->
<div class="row">
<div class="col-sm-9">
<?php
if (have_posts()) {
?>
<?php
/* Start the Loop */
?>
<?php
while (have_posts()) {
示例14: mk_custom_header_feature
function mk_custom_header_feature()
{
global $post, $wp_query;
// Check to see if the header image has been removed
$header_image = get_header_image();
$img_width = get_custom_header()->width;
$img_height = get_custom_header()->height;
$out = '';
if (get_theme_mod('mk_show_custom_header_image', true) == true) {
$out .= '<header class="mk-single-top text-center header-' . strtolower(get_theme_mod('mk_blog_layout', 'classic')) . '">' . "\n";
$out .= '<span class="mk-single-top-overlay-mask"></span>' . "\n";
$header_image_width = get_theme_support('custom-header', 'width');
//$out .='<a href="'.esc_url( home_url( '/' ) ).'">'."\n";
// The header image
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if (is_singular() && has_post_thumbnail($post->ID) && ($image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), array($header_image_width, $header_image_width))) && $image[1] >= $header_image_width) {
// Houston, we have a new header image!
$thumb = get_post_thumbnail_id();
$image = wp_get_attachment_url($thumb, 'full');
$out .= '<img class="mk-header-image" src="' . $image . '" alt="' . esc_attr(get_bloginfo('name', 'display')) . '" />' . "\n";
} else {
$out .= '<img class="mk-header-image" src="' . get_header_image() . '" width="' . get_custom_header()->width . '" height="' . get_custom_header()->height . '" alt="' . esc_attr(get_bloginfo('name', 'display')) . '" />' . "\n";
}
if (is_home() || is_front_page()) {
$out .= '<div class="custom-header-content">' . "\n";
$out .= '<h2>' . esc_attr(get_bloginfo('name', 'display')) . '</h2>' . "\n";
$out .= '<p>' . esc_attr(get_bloginfo('description', 'display')) . '</p>' . "\n";
$out .= '</div>' . "\n";
} elseif (is_single()) {
$out .= '<div class="custom-header-content">' . "\n";
ob_start();
the_title(sprintf('<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h1>') . "\n";
mk_posted_on() . "\n";
mk_entry_footer() . "\n";
$out .= ob_get_clean() . "\n";
$out .= '</div>' . "\n";
} elseif (is_archive()) {
$out .= '<div class="custom-header-content">' . "\n";
ob_start();
the_archive_title('<h1 class="page-title">', '</h1>');
the_archive_description('<div class="taxonomy-description">', '</div>');
$out .= ob_get_clean() . "\n";
$out .= '</div>' . "\n";
} elseif (is_page()) {
$out .= '<div class="custom-header-content">' . "\n";
ob_start();
the_title('<h1 class="entry-title">', '</h1>');
$out .= ob_get_clean() . "\n";
$out .= '</div>' . "\n";
} elseif (is_search()) {
$out .= '<div class="custom-header-content">' . "\n";
$out .= '<h1 class="page-title">' . "\n";
ob_start();
printf(__('Search Results for: %s', 'mk'), '<span>' . get_search_query() . '</span>');
$out .= ob_get_clean() . "\n";
$out .= '</h1>' . "\n";
$out .= '</div>' . "\n";
} elseif (is_404()) {
$out .= '<div class="custom-header-content">' . "\n";
$out .= 'Page cannot be found';
$out .= '</div>' . "\n";
} else {
$out .= '<div class="custom-header-content">' . "\n";
ob_start();
the_title('<h1 class="entry-title">', '</h1>');
$out .= ob_get_clean() . "\n";
}
//$out .='</a>'."\n";
$out .= '</header>' . "\n";
}
// if show custom header images is true
echo $out;
}
示例15: get_header
*
* @package gaunt
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
if (have_posts()) {
?>
<header class="page-header">
<?php
the_archive_title('<h5 class="archive-title">', '</h5>');
the_archive_description('<div class="taxonomy-description">', '</div>');
?>
</header><!-- .page-header -->
<?php
/* Start the Loop */
?>
<?php
while (have_posts()) {
the_post();
?>
<a href="<?php
the_permalink();
?>