Archived topic
Replacing archive page by a page CSS problem
3 replies · Started by byo on January 25, 2020
hi,
I'm replacing a category archive by a page category-{category-name}.php
I've created content via gutenberg, took page.php template, replace it by category-my-category-name.php
Remove this code from the template:
while ( have_posts() ) : the_post();
get_template_part( 'content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || '0' != get_comments_number() ) :
/**
* generate_before_comments_container hook.
*
* @since 2.1
*/
do_action( 'generate_before_comments_container' );
?>
<div class="comments-area">
<?php comments_template(); ?>
</div>
<?php
endif;
endwhile;
Used the PHP closing and opening tags for "generate_before_main_content" and "generate_after_main_content"
Uploaded the file, working
My problem is the footer that is displaying just behind the gutenberg content
By removing this part of the code i've certainly missed with some div content!!?
Need your help on this please
Thank you
I think i fix it by adding this div
<div id="primary" class="content-area grid-parent mobile-grid-100 grid-80 tablet-grid-80">
<main id="main" class="site-main">
I hope i'm not doing it wrong!
Solved the problem by using the archive.php template instead, no footer problem anymore
Awesome - glad to hear you got it resolved and thanks for sharing your method.