M
M
MalGym2018-12-05 03:20:17
WordPress
MalGym, 2018-12-05 03:20:17

Why doesn't it go to the product page?

Hello. Displayed products, when clicking on a product, it does not go to the card of this product, the link is formed correctly, but the content of the page does not change, this is how the product was displayed:

<?php get_header(); ?>

<div class="content-about">
  <div class="wrap">
    <div class="wrap-product">
      <h2 class="about-title">Мои товары</h2>
      <div class="product-list">
        <?php 
          $custom_query = new WP_Query( array( 'post_type' => 'product'));
          if ($custom_query->have_posts()) : while ($custom_query->have_posts()) : $custom_query->the_post();
          global $product;		
        ?>
        <div class="item-product">
          <div class="img-prod">
            <?php the_post_thumbnail(); ?>
          </div>
          <div class="name-prod"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
          <div class="rating-prod"></div>
          <div class="price-prod"><?php echo $product->get_price_html(); ?></div>
          <div class="add-cart">
            <?php woocommerce_template_loop_add_to_cart(); ?>
          </div>
        </div>
        <?php endwhile; endif; ?>
    			<?php wp_reset_query(); ?>
         <?php /*woocommerce_content();*/ ?>
      </div>
    </div>
  </div>
</div>

<?php get_footer(); ?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question