O渐行V渐远O O渐行V渐远O
关注数: 3 粉丝数: 42 发帖数: 352 关注贴吧数: 39
困扰一晚上了,求大家指点 我用的是大前端的D8主题,新建的页面怎么样才能调用分类文章啊。用网上常见的办法index.php里面根本就找不到 <?php if (have_posts()) : ?> 这个代码啊 我都不知道用哪个php文件来修改了,怎么才能让新建页面显示分类文章呢,求大神指点啊 index显示的是最新更新文章,我想修改后变成我想要的分类,希望能有人解答我,痛苦一个晚上了 index的内容是 <?php get_header(); ?> <?php if( dopt(*d_adindex_01_b*) ) printf(*<div class="banner banner-navbar">*.dopt(*d_adindex_01*).*</div>*); ?> <div class="content-wrap"> <div class="content"> <?php if( dopt(*d_adindex_03_b*) ) printf(*<div class="banner banner-contenttop">*.dopt(*d_adindex_03*).*</div>*); if( $paged && $paged > 1 ){ printf(*<header class="archive-header"><h1>最新发布 第*.$paged.*页</h1><div class="archive-header-info"><p>*.get_option(*blogname*).get_option(*blogdescription*).*</p></div></header>*); }else{ if( dopt(*d_sticky_b*) ) include *modules/sticky.php*; printf(*<h2 class="title">最新发布</h2>*); } $paged = (get_query_var(*paged*)) ? get_query_var(*paged*) : 1; $args = array( *caller_get_posts* => 1, *paged* => $paged ); query_posts($args); include *modules/excerpt.php*; ?> </div> </div> <?php get_sidebar(); get_footer(); ?> category.php的内容是 <?php get_header(); ?> <div class="content-wrap"> <div class="content"> <header class="archive-header"> <h1><a href="<?php echo get_category_link( get_cat_ID( single_cat_title(**,false) ) ); ?>"><?php single_cat_title() ?></a></h1> <?php if ( category_description() ) echo *<div class="archive-header-info">*.category_description().*</div>*; ?> </header> <?php include( *modules/excerpt.php* ); ?> </div> </div> <?php get_sidebar(); get_footer(); ?>
1 下一页