<p>If you've setup a channel, it does not include a "blog index" by default, for this you need to make it yourself by placing an index.twig file within the blog folder (If that is a directory in your templates folder).</p>

<p>Check the answer in this question for an example on how to do the twig code.
<a href="https://craftcms.stackexchange.com/questions/2387/whats-the-right-way-to-create-a-simple-blog-in-craft">What&#39;s the right way to create a simple blog in Craft?</a></p>

CC BY-SA 4.0
2019-02-06T19:55:47.210Z
Thanks 2 for providing this info. im gonna try the twig code.
Alejo_Blue
CC BY-SA 4.0
2019-02-06T20:22:24.683Z
that index.twig file, what should i include? what will be the content to put on it? thanks for the response.
Alejo_Blue
CC BY-SA 4.0
2019-02-06T21:30:38.947Z
thanks for your help, indeed it was very informative.
Alejo_Blue
CC BY-SA 4.0
2019-02-06T18:12:31.063Z
2019-02-07T20:55:11.903Z
2019-02-07T20:55:11.903Z
Helge Sverre
<p>If <code>blog</code> is a channel and <code>site.com/blog/blog-post-name</code> is correctly displayed but you can't access <code>site.com/blog</code>, that is probably because you are missing an <code>index.html</code> template inside the <code>blog</code> folder.</p>

<p>Craft will do the route automatically if you add an index.html file inside a section folder. (rightly named)</p>

<p>Then, what you want is to display the blog related posts inside that template.
From there, just make a simple Craft request and loop through the result.</p>

<p>Something like that should work:</p>

<pre><code>{% for entry in craft.entries.section('blog').all %}
    &lt;article&gt;
        &lt;h3&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h3&gt;
    &lt;/article&gt;
{% endfor %}
</code></pre>

<p>I invite you to read the <a href="https://docs.craftcms.com/v3/sections-and-entries.html" rel="nofollow noreferrer">official doc</a>, all the basics (like that one) are well documented and a lot of examples are available.</p>

<p>You may also take a look at the <a href="https://docs.craftcms.com/v3/routing.html" rel="nofollow noreferrer">Routing documentation</a> to understand the step behind Craft routing. </p>

CC BY-SA 4.0
2019-02-06T20:50:38.620Z
2019-02-07T05:00:36.763Z
2019-02-07T05:00:36.763Z
Cryptomothy
<p>The blog post should display the posts created but when I got to the slug /blog it says 404 not found as well as the press news should be displayed here /press-news but same thing happens. </p>

<p>If i access the posts directly : site.com/blog/blog-post-name it is displayed correctly.</p>

<p>an you help me giving me some probable causes so that i can check how to fix it? thanks</p>

<craft3><error-templates>
Blog template not displaying posts
# Blog template not displaying posts

(Asked by: username_0 on 2019-02-06)

The blog post should display the posts created but when I got to the slug /blog it says 404 not found as well as the press news should be displayed here /press-news but same thing happens.

If i access the posts directly : site.com/blog/blog-post-name it is displayed correctly.

an you help me giving me some probable causes so that i can check how to fix it? thanks

**Tags:** craft3, error-templates


---

## 2 answers

### Answer by username_1 on 2019-02-06. Score: 2

If you've setup a channel, it does not include a "blog index" by default, for this you need to make it yourself by placing an index.twig file within the blog folder (If that is a directory in your templates folder).

Check the answer in this question for an example on how to do the twig code.
[What's the right way to create a simple blog in Craft?](https://craftcms.stackexchange.com/questions/2387/whats-the-right-way-to-create-a-simple-blog-in-craft)

> **Comments:**
> **username_0**: Thanks 2 for providing this info. im gonna try the twig code.  
> **username_0**: that index.twig file, what should i include? what will be the content to put on it? thanks for the response.  
> **username_0**: thanks for your help, indeed it was very informative.  

---

### Answer by username_2 on 2019-02-06. Score: 2

If blog is a channel and site.com/blog/blog-post-name is correctly displayed but you can't access site.com/blog, that is probably because you are missing an index.html template inside the blog folder.
Craft will do the route automatically if you add an index.html file inside a section folder. (rightly named)
Then, what you want is to display the blog related posts inside that template.
From there, just make a simple Craft request and loop through the result.
Something like that should work:
{% for entry in craft.entries.section('blog').all %}
    
        {{ entry.title }}
    
{% endfor %}

I invite you to read the official doc, all the basics (like that one) are well documented and a lot of examples are available.
You may also take a look at the Routing documentation to understand the step behind Craft routing.


---

