I am developing a custom theme.
I edited my home.php to show something custom. I also edited index.php to display a list of posts or other things.
After this I can’t get a list of all posts which was by default displayed at the home page.
Which URL can I use to access the list of posts?
First, you need to familiarize yourself with the WordPress Template Hierarchy, so that you ensure that you are modifying the appropriate template file:
home.php
front-page.php
I am assuming that you want to display a static front page, and to display your blog posts index on a separate page? If so:
front-page.php
template file to define the custom front-page markuphome.php
template file to define the markup for your blog posts index (or, omit entirely, and let the blog posts index simply fall back toindex.php
)Dashboard -> Settings -> Reading
appropriatelyIf you want a global recent posts list you need to create a loop
that would show them if you want to show them in your home.php
you can use this code where you want.. (no inside the loop)
.
i have left the amount of posts shown there so you can control it…
Additional arguments you can use to refine the loop can be found at
WP Query in the wordpress codex…
Hope this Helps 😉
Sagive.
.
(p.s: 0% accept rate which is what you have is not ok.. you should go back to the question you asked and either answer them yourself or pick the correct answer if exist and approve it… It best for the community)