2 Star 0 Fork 0

fangyufangxuan/Company

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
archive.php 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
fanshuai0217 提交于 2014-05-14 14:55 . 第一次提交
<?php
/**
* Archive page - displays posts in a blog format, filtered by category, date created, etc.
*/
get_header();
//get all the page data needed and set it to an object that can be used in other files
$pexeto_page=array();
$pexeto_page['sidebar']=pexeto_option( 'archive_sidebar' );
$pexeto_page['slider']='none';
$pexeto_page['layout']=pexeto_option( 'archive_layout' );
if ( is_category() ) {
$p_cat = get_category( get_query_var( "cat" ) );
$pexeto_page['title'] = $p_cat->name;
} elseif ( is_tag() ) {
$p_tag = get_term_by( "slug", get_query_var( "tag" ), "post_tag" );
$pexeto_page['title'] =$p_tag->name;
} elseif ( is_day() ) {
$pexeto_page['title'] = get_the_time( 'F jS, Y' );
} elseif ( is_month() ) {
$pexeto_page['title'] = get_the_time( 'F Y' );
} elseif ( is_year() ) {
$pexeto_page['title'] = get_the_time( 'Y' );
} elseif ( is_author() ) {
$pexeto_page['title'] = get_the_author();
}
//include the before content template
locate_template( array( 'includes/html-before-content.php' ), true, true );
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
global $more;
$more = 0;
//include the post template
locate_template( array( 'includes/post-template.php' ), true, false );
}
locate_template( array( 'includes/post-pagination.php' ), true, false );
}else {
_e( 'No posts available', 'pexeto' );
}
//include the after content template
locate_template( array( 'includes/html-after-content.php' ), true, true );
get_footer();
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/rxfang/Company.git
git@gitee.com:rxfang/Company.git
rxfang
Company
Company
master

搜索帮助