Child Theme Bug: some posts are removed from the HTML tag where they are placed
-
I already ask this question in StackOverflow, but it has no answaers. Maybe you guys could help me.
I’m developing a child theme of Onepress. I need all posts displayed inside a container div that is inside the main tag. I did it in my code, but, some posts are rendered outside the main tag in the browser. It breaks the layout. Any help will be deeply apprecciated!
Here’s the code in my file:
<div id="content" class="site-content"> <?php onepress_breadcrumb(); ?> <div id="content-inside" class="container"> <div id="primary" class="content-area"> <main class="site-main" role="main"> <div class="container"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="container"> <?php get_template_part( 'template-parts/content', 'custom' ); ?> </div> <?php endwhile; the_posts_navigation(); else : get_template_part( 'template-parts/content', 'none' ); endif; ?> </div> </main><!-- #main --> </div><!-- #primary --> </div><!--#content-inside --> </div><!-- #content -->
And this is the code rendered in the browser:
<div id="content" class="site-content"> <?php onepress_breadcrumb(); ?> <div id="content-inside" class="container"> <div id="primary" class="content-area"> <main class="site-main search-page" role="main"> <div class="container"> SOME POSTS HERE </div> </main><!-- #main --> <!-- OTHER POSTS ARE INCORRECTLY HERE --> <div class="container"> INCORRECTLY PLACED POSTS </div><!-- incorrectly placed posts --> </div><!-- #primary --> </div><!--#content-inside --> </div><!-- #content -->
So, anyone have a clue about how to fix this bug? Thank you, guys!
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Child Theme Bug: some posts are removed from the HTML tag where they are placed’ is closed to new replies.