Create pagination

0

Good night, everyone?

I have a question, I have customized the page to the category page of woocommerce wordpress as I need it in the following way.

Note: it's working perfectly, my template's archive-product.php file edited

I need to create a page for this page or show me 20 products at a time how do I do this?


                                                      'product',                                                 'posts_per_page' = > 15,                                                 'product-category' = > shoes                                                 'orderby' = > 'rand'                                             );                                 $ loop = new WP_Query ($ args);                                 while ($ loop-> have_posts ()): $ loop-> the_post ();                                     global $ product;

                                $parcela    = get_field("parcela");
                                $parcela    = (float)$parcela;
                                $parcela    = number_format($parcela, 2, ',', '.');
                                $qt_parcela = get_field("qt_parcela");
                                $avista     = get_field("a_vista");
                                $avista     = (float)$avista;
                                $avista     = number_format($avista, 2, ',', '.');
                                $price      = get_post_meta( get_the_ID(), '_regular_price', true);
                                $formatado  = (float)$price;
                                $valor      = number_format($formatado, 2, ',', '.');
                                $currency   = get_woocommerce_currency_symbol();

                            ?>
                            <li style="width: 33.0%!important;" class="product type-product status-publish has-post-thumbnail product_cat-mesa-de-sinuca-e-jantar product_cat-mesa-de-sinuca-personalizada first instock sold-individually shipping-taxable purchasable product-type-simple">    

                                <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 class="attachment-shop_catalog size-shop_catalog wp-post-image" src="'.woocommerce_placeholder_img_src().'" alt="Placeholder" width="300px" height="255px" />'; 
                                    ?>
                                </a>    
                                <div class="collection_desc clearfix">
                                    <a href="<?php echo get_permalink( $loop->post->ID ) ?>" class="collection_title">
                                        <h3><?php the_title(); ?></h3>
                                    </a>                                        
                                </div>
                                <div class='row'> 
                                    <div class=''>                                  
                                        <div class=' custom-title-product'>
                                            <a href=".$link.">
                                                <h3 class='custom-title-product'><?php echo $title ?></h3>
                                            </a>                        
                                        </div>
                                <div class='text-center custom-value'>
                                    <span>                              
                                        <?php echo $currency . $valor ?>
                                    </span>
                                </div>
                                <div class='text-center'> 
                                    <span class='custom-inf-parcela '> ou em até <?php echo $qt_parcela ?> x de </span> 
                                    <span class='custom-valor-parcela'>  R$ <?php echo $parcela ?> </span> 
                                    <span class='custom-inf-parcela '> na entrega </span>
                                </div>
                                <div class='text-center'>
                                    <span class='custom-inf-parcela '> ou apenas </span>
                                    <span class='custom-valor-parcela'> R$ <?php echo $avista ?> </span>
                                    <span class='custom-inf-parcela '> à vista na entrega <span>
                                </div>
                            </div>
                            </li>                           
                        <?php endwhile; ?>
                        <?php wp_reset_query(); ?>
                    </ul><!--/.products-->
                </div>
    
asked by anonymous 02.11.2018 / 03:53

0 answers