Hello, I am doing an online store on woocommerce, and I ran into the problem that the footer somehow turned out to be inside the .content block. Attaching files templates wocommerce

single-product.php:

get_header( 'shop' ); ?> <div class="content"> <div class="header_wrap"> <div class="header_wrap_container"> <div class="row paddingbot15"> <!-- Catalog wraper --> <div class="col-lg-3 col-md-3 col-sm-3 hidden-xs nopadding"> <div class="catalog"> <?php wp_nav_menu( array( 'container' => false, 'menu' => 'Категории', 'menu_class' => '', ) ); ?> </div> <?php get_sidebar('tagcloud'); ?> <?php get_sidebar('feedback'); ?> </div> <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12 nopaddingright nopaddingmobile"> <div class="goods_wrap"> <?php /** * woocommerce_before_main_content hook. * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action( 'woocommerce_before_main_content' ); ?> <?php while ( have_posts() ) : the_post(); ?> <?php wc_get_template_part( 'content', 'single-product' ); ?> <?php endwhile; // end of the loop. ?> </div> </div> </div> </div> </div> </div> <?php get_footer( 'shop' ); ?> 

archive-product.php:

 get_header( 'shop' ); ?> <div class="content"> <div class="header_wrap"> <div class="header_wrap_container"> <div class="row paddingbot15"> <!-- Catalog wraper --> <div class="col-lg-3 col-md-3 col-sm-3 hidden-xs nopadding"> <div class="catalog"> <?php wp_nav_menu( array( 'container' => false, 'menu' => 'Категории', 'menu_class' => '', ) ); ?> </div> <?php get_sidebar('tagcloud'); ?> <?php get_sidebar('feedback'); ?> </div> <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12 nopaddingright nopaddingmobile"> <div class="goods_wrap"> <?php /** * woocommerce_before_main_content hook. * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action( 'woocommerce_before_main_content' ); ?> <?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?> <h1 class="page-title"><?php woocommerce_page_title(); ?></h1> <?php endif; ?> <?php /** * woocommerce_archive_description hook. * * @hooked woocommerce_taxonomy_archive_description - 10 * @hooked woocommerce_product_archive_description - 10 */ do_action( 'woocommerce_archive_description' ); ?> <?php if ( have_posts() ) : ?> <?php /** * woocommerce_before_shop_loop hook. * * @hooked woocommerce_result_count - 20 * @hooked woocommerce_catalog_ordering - 30 */ do_action( 'woocommerce_before_shop_loop' ); ?> <?php woocommerce_product_loop_start(); ?> <?php woocommerce_product_subcategories(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php wc_get_template_part( 'content', 'product' ); ?> <?php endwhile; // end of the loop. ?> <?php woocommerce_product_loop_end(); ?> <?php /** * woocommerce_after_shop_loop hook. * * @hooked woocommerce_pagination - 10 */ do_action( 'woocommerce_after_shop_loop' ); ?> <?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?> <?php wc_get_template( 'loop/no-products-found.php' ); ?> <?php endif; ?> </div> </div> </div> </div> </div> </div> <?php get_footer( 'shop' ); ?> 

Here's what happened in the end: enter image description here

Closed due to the fact that Nicolas Chabanovsky 20 Feb '17 at 8:46 am not on topic.

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - Nicolas Chabanovsky
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    The question "how it happened" the answer is simple - "this is how the curve code is written" But not sure what exactly this issue is. So why not just ask the right one? Ida advise you to read at least the basics of VP (about cycles) before drawing these .. if I may say so, "templates". And the php tag is superfluous here. - SeVlad

1 answer 1

The number of opening div greater than closing divs.

  • but you can't argue that the answer is) - Oleksandr
  • If you can poke me in the face the place where I didn’t close the div, I really ask you, I just don’t understand anything. - DiceMasters
  • Specifically, here you are all closed, but there is also a footer and a header - Stanislav Belichenko
  • But how did he close everything here when he had a footer inside the header-wrap - KAGG Design
  • In general, it turned out that inside one of the native WP action games and hooks there are unclosed divas, I decided to insert the following into my templates: </ div> <! - WHAT BL *** h xa for a crutch but don’t touch its future developer it works - > and voila it works - DiceMasters