Title: Standard Loop
Last modified: August 31, 2016

---

# Standard Loop

 *  [Edgar Oliveira](https://wordpress.org/support/users/eno_2015/)
 * (@eno_2015)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/standard-loop/)
 * Hello everyone,
 * I was readind this article ([https://codex.wordpress.org/Class_Reference/WP_Query](https://codex.wordpress.org/Class_Reference/WP_Query))
   and try run the **Standard Loop**, but I can’t receive the any result. My code
   is this:
 *     ```
       <?php get_header();
       /*
       	Template Name: Page teste
       */
       ?>
       	<?php
       	echo "ola";
       	// The Query
       $the_query = new WP_Query( $args );
   
       // The Loop
       if ( $the_query->have_posts() ) {
       	echo '<ul>';
       	while ( $the_query->have_posts() ) {
       		$the_query->the_post();
       		echo '<li>' . get_the_title() . '</li>';
       	}
       	echo '</ul>';
       } else {
       	// no posts found
       }
       /* Restore original Post Data */
       wp_reset_postdata();
   
       	get_footer();
       ?>
       ```
   
 * This code is on file call “page-test.php”. Which is a template for a page on 
   my WordPress.
 * thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/standard-loop/#post-6980281)
 * you need to add an `$args` array to tell the query what you want to see.
 * this is missed in the description here [https://codex.wordpress.org/Class_Reference/WP_Query#Standard_Loop](https://codex.wordpress.org/Class_Reference/WP_Query#Standard_Loop)
 * you will find examples when you read the **whole **chapter [https://codex.wordpress.org/Class_Reference/WP_Query](https://codex.wordpress.org/Class_Reference/WP_Query)
 *  Thread Starter [Edgar Oliveira](https://wordpress.org/support/users/eno_2015/)
 * (@eno_2015)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/standard-loop/#post-6980282)
 * Ok, thanks! I am a newbie on wordpress and php. I will continue read this article.
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Standard Loop’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Edgar Oliveira](https://wordpress.org/support/users/eno_2015/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/standard-loop/#post-6980282)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
