Advertisement
sdcom

archive.php

Aug 18th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. <section>
  2. <div class="gap">
  3. <div class="container">
  4. <div class="remove-ext3">
  5. <div class="row">
  6.  
  7. <?php $custom_query_args = array( 'posts_per_page' => 6, 'paged' => $paged );
  8.  
  9. $custom_query_args['paged'] = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
  10.  
  11. $custom_query = new WP_Query( $custom_query_args );
  12.  
  13. $temp_query = $wp_query;
  14. $wp_query = NULL;
  15. $wp_query = $custom_query;
  16.  
  17. if ( $custom_query->have_posts() ) :
  18. while ( $custom_query->have_posts() ) :
  19. $custom_query->the_post(); ?>
  20.  
  21. <div class="col-md-4 col-sm-6">
  22. <div class="article-box">
  23. <div class="article-thmb-new">
  24. <a href="<?php the_permalink()?>" itemprop="url">
  25. <?php if( get_post_meta($post->ID, 'prod_imagem', $post_id) ); ?>
  26. <img src="<?php the_field('prod_imagem', $post_id ); ?>" alt="" itemprop="image" />
  27. </a>
  28. </div>
  29. <div class="middle">
  30. <p>clique na foto para mais detalhes</p>
  31. </div>
  32. <div class="cat-info">
  33. <ul class="article-meta" style="margin-bottom: 10px;">
  34. <li style="font-size:18px;">CÓDIGO:
  35. <span style="color:#b59d5a;">
  36. <?php if( get_post_meta($post->ID, 'prod_codigo', $post_id) ); ?>
  37. <?php the_field('prod_codigo', $post_id ); ?>
  38. </span>
  39. </li>
  40. </ul>
  41. <h5 itemprop="headline"><?php the_title(); ?></h5>
  42.  
  43. <?php if ( is_user_logged_in() ) : ?>
  44. <ul class="article-meta">
  45. <li style="font-size:18px;">VALOR:
  46. <span style="color:#b59d5a;">
  47. <?php if( get_post_meta($post->ID, 'prod_valor', $post_id) ); ?>
  48. <?php the_field('prod_valor', $post_id ); ?>
  49. </span>
  50. </li>
  51. </ul>
  52. <?php endif; ?>
  53. </div>
  54. </div>
  55. </div>
  56.  
  57. <?php endwhile; ?>
  58. <?php endif;
  59.  
  60. wp_reset_postdata();
  61.  
  62. sdcom_numeric_posts_nav();
  63.  
  64. $wp_query = NULL;
  65. $wp_query = $temp_query;?>
  66.  
  67. </div>
  68.  
  69. </div>
  70. </div>
  71. </div>
  72. </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement