为了寻找解决方案,我想提供更多有关我迄今为止所做工作的信息:
我的实际配置-WordPress:3.8-PHP:5.3-主题:基于s(下划线)的自定义-Hebergour:local XAMPP
我的存档模板
<main id="main" class="site-main" role="main">
<?php
// get all the categories from the database
$cats = get_categories(\'child_of=34\'); //cat 34 is the main category
// loop through the categries
foreach ($cats as $cat) {
// setup the cateogory ID
$cat_id= $cat->term_id;
// Make a header for the cateogry
echo "<h2>".$cat->name."</h2>";
// create a custom wordpress query
query_posts("cat=$cat_id&posts_per_page=-1");
// start the wordpress loop!
if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php // create our link now that the post is setup ?>
<a href="<?php the_permalink();?>"><?php the_title(); ?></a>
<?php echo \'<hr/>\'; ?>
<?php endwhile; endif; // our wp loop will start again for each category ?>
<?php } // done the foreach statement ?>
</main><!-- #main -->
1-尝试使用wp\\u get\\u归档,我有个月的列表,但不可能排除/包括特定类别。
2-尝试使用wp\\u list\\u categories,我得到了categories列表,但无法排除/包括特定类别。
我找到了“WordPress分类档案”插件,但他自2011年以来一直没有更新过我也找到了http://kwebble.com “WordPress插件类别存档”,但不再维护。
仍在寻找解决方案。
谢谢你的帮助