[Resolved] Replacing archive page by a page CSS problem

Home Forums Support [Resolved] Replacing archive page by a page CSS problem

Home Forums Support Replacing archive page by a page CSS problem

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1144272
    byo

    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

    #1144276
    byo

    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!

    #1144291
    byo

    Solved the problem by using the archive.php template instead, no footer problem anymore

    #1144457
    David
    Staff
    Customer Support

    Awesome – glad to hear you got it resolved and thanks for sharing your method.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.