Search code examples
wordpressdebuggingwordpress-themingcustom-wordpress-pages

Mystery WordPress archive template


I need your help! Do you have any idea what's going on? I have following code:

<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>

Do you see that numbers 4321? So, problem that when I go to single author posts archive page I see only 3 and 4 (that's mean code inside while not work for it but I can see all posts, just in different template), BUT when I open some category page with posts listing — it's show me all numbers in following order: 3124 that's mean that everything working how it's should be. This code in archive.php file. I need setup the same template for authors posts and category listings. Thank you!


Solution

  • The problem was in that it have this plugin https://toolset.com/ that overwrite some templates and store all code in database.