Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The Default Page Template for Strong
- *
- * Displays the Pages.
- *
- * @package SKT Strong
- *
- * @since SKT Strong 1.0
- */
- global $complete;?>
- <?php get_header();?>
- <div class="page_wrap layer_wrapper">
- <!--CUSTOM PAGE HEADER STARTS-->
- <?php get_template_part('sktframe/core','pageheader'); ?>
- <!--CUSTOM PAGE HEADER ENDS-->
- <div id="content">
- <div class="center">
- <div class="single_wrap no_sidebar">
- <div class="single_post">
- <?php if(have_posts()): ?><?php while(have_posts()): ?><?php the_post(); ?>
- <!--EDIT BUTTON START-->
- <?php if ( is_user_logged_in() || is_admin() ) { ?>
- <div class="edit_wrap">
- <a href="<?php echo get_edit_post_link(); ?>">
- <?php _e('Edit','strong'); ?>
- </a>
- </div>
- <?php } ?>
- <!--EDIT BUTTON END-->
- <h1><?php the_title(); ?></h1>
- <div class="woocommerce">
- <ul class="products">
- <?php
- $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
- $args = array(
- 'post_type' => 'product',
- 'posts_per_page' => 12,
- 'paged' => $paged,
- );
- $loop = new WP_Query( $args );
- if ( $loop->have_posts() ) {
- while ( $loop->have_posts() ) : $loop->the_post();
- wc_get_template_part( 'content', 'product' );
- endwhile;
- } else {
- echo __( 'No products found' );
- }
- wp_reset_postdata();
- ?>
- </ul>
- <!-- <?php // _e(__FILE__, 'strong') ?> -->
- <?php
- $the_query = new WP_Query( $args );
- if ($the_query->max_num_pages > 1) { // check if the max number of pages is greater than 1 ?>
- <nav class="woocommerce-pagination">
- <ul class="page-numbers">
- <li> <?php echo get_previous_posts_link( 'Anterior' ); // display newer posts link ?> </li>
- <li> <?php echo get_next_posts_link( 'Siguiente', $the_query->max_num_pages ); // display older posts link ?> </li>
- </ul>
- </nav>
- <?php } ?>
- </div>
- <?php endwhile ?>
- </div>
- <?php endif ?>
- </div>
- <!--PAGE END-->
- </div>
- </div>
- </div><!--layer_wrapper class END-->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement