Change Category Page Woocommerce Wordpress

0

Good evening, everyone, all right?

I have a small question, I would like to adjust my category's product listing page equal to my home from this site link obs: I made a Shortcode in function.php that lists this way 'title', 'value' 'inf1' and 'inf2', I would like my category page that lists the products according to the category that the user select is in the same way, I can not find the file for me to edit and I do not even know where to start.

    
asked by anonymous 01.11.2018 / 03:51

1 answer

0

I was able to solve my problem, my code was as follows, within my theme theme / woocommerce / archive-product.php

                    <div class="wc-products">
                        <ul class="products">
                            <?php
                                $args = array( 'post_type' => 'product', 'posts_per_page' => 1, 'product-category' => 'shoes', 'orderby' => 'rand' );
                                $loop = new WP_Query( $args );
                                while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>

                                    <h2>Shoes</h2>

                                        <li class="product">    

                                            <a href="<?php echo get_permalink( $loop->post->ID ) ?>" title="<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>">

                                                <?php woocommerce_show_product_sale_flash( $post, $product ); ?>

                                                <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog'); else echo '<img src="'.woocommerce_placeholder_img_src().'" alt="Placeholder" width="300px" height="300px" />'; ?>

                                                <h3><?php the_title(); ?></h3>

                                                <span class="price"><?php echo $product->get_price_html(); ?></span>                    

                                            </a>

                                            <?php woocommerce_template_loop_add_to_cart( $loop->post, $product ); ?>

                                        </li>

                            <?php endwhile; ?>
                        <?php wp_reset_query(); ?>
                    </ul><!--/.products-->
                </div>
    
02.11.2018 / 01:59