Title: Adding posts to template
Last modified: August 20, 2016

---

# Adding posts to template

 *  [Maracas1970](https://wordpress.org/support/users/maracas1970/)
 * (@maracas1970)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/)
 * Hi
 * My site _ [http://www.gotodesigns.co.uk/](http://www.gotodesigns.co.uk/)
 * Having some issues trying to get the posts loop working, i have a static front
   page that has no loop on it, i only want my posts to appear on the blog page,
   i have put the loop on this page in the blog.php i created, but cant get the 
   posts to show up. I have tried the changing front page to static and selecting
   the template page for my blog page in the settings reading section in admin panel,
   but each time i do that it just links to my homepage.
 * I have created one post, i haven’t created any categories so it goes in uncategorized.
   Is there some code i`m missing to pull posts into the page, or do i maybe need
   to create a template for my posts page?
 * I`ll do a paste of my current blog posts page markup to see if i`m missing the
   obvious, quite likely..
 * [http://pastebin.com/Kh26PbLe](http://pastebin.com/Kh26PbLe)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/adding-posts-to-template/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/adding-posts-to-template/page/2/?output_format=md)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436518)
 * Your main posts page will use the index.php template file.
 *  Thread Starter [Maracas1970](https://wordpress.org/support/users/maracas1970/)
 * (@maracas1970)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436520)
 * So the loop needs to be there as opposed to the blog page itself?Sorry my head
   is going sideways with this, i`m on day three of trying to figure it out..
    And
   if it is the case, i dont want posts on my homepage, because as you`ll see it
   is a welcome/splash page with no content, if i do put the loop here wont it show
   up as a link to a non existent post on my frontpage?
 * Thanks
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436534)
 * See [creating a static front page](http://codex.wordpress.org/Creating_a_Static_Front_Page)
 *  Thread Starter [Maracas1970](https://wordpress.org/support/users/maracas1970/)
 * (@maracas1970)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436544)
 * OK
 * So i have got a post to show up and it takes me to a version of my homepage, 
   with the banner etc, but i want it to not include that.I intend the blog page
   to be like the internal pages, without the large homepage banner.
 * Also i added the <?php if (is_home()) { ?> <?php } ?>
    on the homepage to try
   and remove the traces of the loop, but it made the post disappear from the blogpage.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436546)
 * Stop messing with template files! Set up a static front page and a main posts
   page using the default page template first.
 *  Thread Starter [Maracas1970](https://wordpress.org/support/users/maracas1970/)
 * (@maracas1970)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436552)
 * I`ve done that though in the settings/reading section.
 * I added two new pages one for blog one for home in admin/pages/add new. I called
   one home, and selected home from the drop down list.
 * Then i selected the page for my posts to go on, which i entitled Articles (i 
   selected my blog.php template on the drop down page attribute when creating this
   page). There is a copy of the loop on my template file for the blog.php and my
   index.php (homepage).
 * Now artifacts from the loop are on my homepage and my blog posts appear on another
   version of my homepage..
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436554)
 * > i selected my blog.php template on the drop down page attribute when creating
   > this page
 * Don’t! It will not help in any way. As I said above, the main posts page uses
   the theme’s index.php template file. Full stop. No exceptions.
 * Your front page should now be using the default page template, yes?
 *  Thread Starter [Maracas1970](https://wordpress.org/support/users/maracas1970/)
 * (@maracas1970)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436555)
 * Yes it is, i changed back to default the blog page i created (articles) in the
   create new page, now all posts have dissapeared.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436557)
 * The blog page will now be using the index.php template file, so it is this file
   that you need to investigate.
 *  Thread Starter [Maracas1970](https://wordpress.org/support/users/maracas1970/)
 * (@maracas1970)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436562)
 * OK thanks i appreciate the help really i do.
 * Investigations are usually spurred along by clues, and as you no doubt are realizing
   i dont have one!
 * As you can see by looking at the two pages, my homepage references “home” now
   and the blog page references “blog” The pages “loop” back on themselves..
 * “I think” I need to change some parameter within the loop on the index.php for
   it to pull the posts to the blog page, just not sure which parameter.
 * regards
 * Maracas
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436564)
 * No – forget about blog.php. Delete it from the theme. You need to add a basic
   loop to index.php if it doesn’t have one already.
 *  Thread Starter [Maracas1970](https://wordpress.org/support/users/maracas1970/)
 * (@maracas1970)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436567)
 * There is a loop on the index page, i can assure you of that.
 * You see my homepage is different from my internal pages as it`s a template i 
   coded myself, this may be where the misunderstanding is occurring. So if i delete
   the blog.php it will not be there in my navigation.
 * So if i select the page after deleting blog.php will it still turn up in the 
   nav, or will i have to change the link structure again to reflect the changes?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436568)
 * > So if i delete the blog.php it will not be there in my navigation.
 * It shouldn’t be there. A template file should **never** be referenced directly
   on the front end of a site. Perhaps you need to review [Theme Development](http://codex.wordpress.org/Theme_Development)?
 *  Thread Starter [Maracas1970](https://wordpress.org/support/users/maracas1970/)
 * (@maracas1970)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436569)
 * The method i have used is purely to create each page in HTML/CSS. Then chop it
   up, and take out the header, footer content etc and turned them into individual
   php files along with a stylesheet and a resources folder. And that is basically
   my theme.
 * I then created a page for each within WordPress and used the attributes section
   on each page to link up my navigation?
 * This is totally wrong then?
 * Regards
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/#post-2436570)
 * > This is totally wrong then?
 * Yep. You need to create your pages **within** WordPress. And read up on how themes&
   their templates work.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/adding-posts-to-template/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/adding-posts-to-template/page/2/?output_format=md)

The topic ‘Adding posts to template’ is closed to new replies.

## Tags

 * [add posts](https://wordpress.org/support/topic-tag/add-posts/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 18 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/adding-posts-to-template/page/2/#post-2436587)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
