Created
November 6, 2017 13:00
-
-
Save nandomoreirame/835946c9e052a93b648b33374ad32b7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $products_args = array( | |
| 'post_type' => 'products', | |
| 'posts_per_page' => 10 | |
| ); | |
| $products_query = new WP_Query($products_args); | |
| ?> | |
| <?php if ($products_query->have_posts()): ?> | |
| <?php while ($products_query->have_posts()): $products_query->the_post(); ?> | |
| <article class="entry"> | |
| <header class="entry__heading"> | |
| <h2 class="entry__title"><?php the_title(); ?></h2> | |
| </header> | |
| <div class="entry__content"> | |
| <?php the_content(); ?> | |
| </div> | |
| </article> | |
| <?php endwhile; ?> | |
| <?php endif; ?> | |
| <?php wp_reset_postdata(); // Reset Post Data ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment