Title: wordpress theme from scratch, code issues &#8230;
Last modified: February 15, 2023

---

# wordpress theme from scratch, code issues …

 *  Resolved [eggbird](https://wordpress.org/support/users/eggbird/)
 * (@eggbird)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wordpress-theme-from-scratch-code-issues/)
 * I write my own wordpress theme. I have simple php code to show all my posts. 
   The code “loops” endlessly ….. why ? I have 10 posts in the database …
 * The code: [http://schaakmatinzuidoost.nl](http://schaakmatinzuidoost.nl)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwordpress-theme-from-scratch-code-issues%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [eggbird](https://wordpress.org/support/users/eggbird/)
 * (@eggbird)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wordpress-theme-from-scratch-code-issues/#post-16475352)
 * the code file : [schaakmatinzuidoost.nl/index.txt](http://schaakmatinzuidoost.nl/index.txt)
 *  Thread Starter [eggbird](https://wordpress.org/support/users/eggbird/)
 * (@eggbird)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wordpress-theme-from-scratch-code-issues/#post-16475362)
 * The code is saved in the index.php file in the theme map
 *  Thread Starter [eggbird](https://wordpress.org/support/users/eggbird/)
 * (@eggbird)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wordpress-theme-from-scratch-code-issues/#post-16475440)
 * No looping any more : no posts ?
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wordpress-theme-from-scratch-code-issues/#post-16478306)
 * You shouldn’t require_once wp-load.php. Such a statement is not fully portable
   to other sites because where it is relative to document root is unpredictable.
   It’s also entirely unnecessary to do so in a theme template. WP has already been
   loaded by the time your template file executes.
 * Template files should always call `wp_head();` as one of its first things. Or
   load a header template file that does so. Failing to do so somewhere means important
   resources are not included in the page.
 * If you are getting “Geen berichten”, the query was not able to find any posts
   matching the query vars used. You need to determine what query vars were in place
   to prevent posts from being returned. Try using the Query Monitor plugin to help
   you diagnose what’s wrong with the query vars.
 *  Thread Starter [eggbird](https://wordpress.org/support/users/eggbird/)
 * (@eggbird)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wordpress-theme-from-scratch-code-issues/#post-16483873)
 * Thanks, the code works !
 *  Thread Starter [eggbird](https://wordpress.org/support/users/eggbird/)
 * (@eggbird)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wordpress-theme-from-scratch-code-issues/#post-16483889)
 * resolved …

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

The topic ‘wordpress theme from scratch, code issues …’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 6 replies
 * 2 participants
 * Last reply from: [eggbird](https://wordpress.org/support/users/eggbird/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/wordpress-theme-from-scratch-code-issues/#post-16483889)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
