Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-06T19:55:47.210Z
Answers.Text: Thanks 2 for providing this info. im gonna try the twig code.
Answers.UserDisplayName: Alejo_Blue
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-06T20:22:24.683Z
Answers.Text: that index.twig file, what should i include? what will be the content to put on it? thanks for the response.
Answers.UserDisplayName: Alejo_Blue
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-06T21:30:38.947Z
Answers.Text: thanks for your help, indeed it was very informative.
Answers.UserDisplayName: Alejo_Blue
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-06T18:12:31.063Z
Answers.LastActivityDate: 2019-02-07T20:55:11.903Z
Answers.LastEditDate: 2019-02-07T20:55:11.903Z
Answers.UserDisplayName: Helge Sverre
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-06T20:50:38.620Z
Answers.LastActivityDate: 2019-02-07T05:00:36.763Z
Answers.LastEditDate: 2019-02-07T05:00:36.763Z
Answers.UserDisplayName: Cryptomothy
Body: <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>
  
Tags: <craft3><error-templates>
Title: Blog template not displaying posts
ThreadText: # 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 %}
      <article>
          <h3><a href="{{ entry.url }}">{{ entry.title }}</a></h3>
      </article>
  {% endfor %}
  
  ```
  
  I invite you to read the [official doc](https://docs.craftcms.com/v3/sections-and-entries.html), 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](https://docs.craftcms.com/v3/routing.html) to understand the step behind Craft routing.
  
  
  ---
  
  