Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
神秘WordPress存档模板_Wordpress_Debugging_Wordpress Theming_Custom Wordpress Pages - Fatal编程技术网

神秘WordPress存档模板

神秘WordPress存档模板,wordpress,debugging,wordpress-theming,custom-wordpress-pages,Wordpress,Debugging,Wordpress Theming,Custom Wordpress Pages,我需要你的帮助!你知道发生了什么事吗? 我有以下代码: <div id="post-list"> 3 <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> 1 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="arti

我需要你的帮助!你知道发生了什么事吗? 我有以下代码:

<div id="post-list">
3
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
1
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <div class="article-inner <?php flatsome_blog_article_classes(); ?>">
        <?php get_template_part('template-parts/posts/partials/entry-header', flatsome_option('blog_posts_header_style') ); ?>
        <?php get_template_part('template-parts/posts/content', 'default' ); ?>
        <?php get_template_part('template-parts/posts/partials/entry-footer', 'default' ); ?>
    </div><!-- .article-inner -->
</article><!-- #-<?php the_ID(); ?> -->
2
<?php endwhile; ?>
4

<?php flatsome_posts_pagination(); ?>

</div>

3.
1.

问题在于它有一个插件,可以覆盖一些模板,并将所有代码存储在数据库中。

Google“wordpress模板层次结构”,有一个很好的信息图解释了这一点。顺便说一句,你描述问题的方式非常混乱…我知道层次结构,它在同一个文件中!也许我描述的不太清楚,但正是这个文件显示了这两个列表。我很难理解你在这里问的问题-你的意思是“为什么我的作者档案帖子没有显示,而同一个模板文件显示的是类别档案帖子?”这个文件archive.php中的代码适用于作者归档和类别归档,我没有任何其他文件可以替代,所以肯定只有这一个文件显示了这两种情况下的帖子列表,但是,当我尝试调试这个文件时,我看到它在类别中工作(显示所有数字),但对于作者的存档-它只显示第一个和最后一个数字,如果我删除这个“while”循环-到处都不会显示帖子,这意味着这正是这个文件,我没有任何其他文件对模板产生影响。