WordPress: Display list of all posts

Geschätzte Lesezeit: 1 Minute, 54 Sekunden

This article explains how to automatically display a list of all WordPress posts on a single page. You only need to add a single source file and you are ready to go.

list of posts
Photo NCinDC

Automatically display all posts in WordPress

There are some situations where you want to have an overview of all posts you ever made in your WordPress blog. May it be issues of tightening your internal link profile or some methodic approach to social media marketing and content spreading. It may even be the case that you want to give a list of all posts to your valued readers whatever reason for.

Of course I do not suggest you to manually compile these posts from time to time. There is an automatic and really neat way to get to the goal. And it works with the newest WordPress version. Take the following source code and put it into a file named page-allposts.php. Then upload the file to your WordPress webspace and there into the directory of your active  theme. If you use Twentythirteen as I do, then copy the file to the folder /wp-content/themes/twentythirteen/ under your WordPress root directory. Here is the code:

Code to display all posts
Code to display all posts

This code is taken from the great article How to display all posts in a single page using WordPress and then adapted by me (I could not paste it in as WordPress and the Scripts used destroyed it on display). It may be necessary to do some slight adjustments regarding the layout in case you use a different theme. For that, take the existing file page.php as inspiration (same directory as above mentioned)…

After having the code in place, create a new page (not a post!) and choose All Posts as a template:

display all posts
Using the all posts template

Also you can have a page title in place as with any other ordinary page. The text from the main content you type will be shown above the automatically generated list of all WordPress posts. On ERFOLGSREZEPTE ONLINE the final result looks like this:

All Posts list
WordPress: List of all posts

You may also like to see a live view of the generated page (it seems as it only shows up if you are logged in as admin, I am still figuring out why).

As SEO expert I would like to give you one tip for the all posts page: Set the page to nofollow as this would not make any sense, except wasting the crawl budget for your site.

Have fun!

PS: In case you make some enhancements to the code I would love to hear from you!

How did you like this post?

WordPress: Display list of all posts: 1 Stern2 Sterne3 Sterne4 Sterne5 Sterne 5,00 von 5 Punkten, basieren auf 3 abgegebenen Stimmen.

Webhosting inkl. Homepagebaukasten!
Folge mir

Dr. Klaus Meffert

Der Autor ist Diplom-Informatiker und hat neben seinem Beruf als Organisationsberater zum Doktoringenieur promoviert. Er besitzt 30 Jahre Erfahrung im IT-Bereich (Software-Lösungen, Apps, Web, Online-Marketing, IT-Beratung) ist mehrfacher Buchautor und Autor zahlreicher Fachartikel. Er hilft Unternehmen mit maßgeschneiderten Software-Lösungen und mit besseren Google-Rankings zu mehr Erfolg.
Dr. Klaus Meffert
Folge mir

Weitere Beiträge

Ein Gedanke zu „WordPress: Display list of all posts

  1. cheers for the actual article i’ve recently been on the lookout with regard to this kind of advice on the net for sum time proper now so numerous thanks eakgeedcgead

Kommentare sind geschlossen.