WordPress Class – AppendPostData

In the midst of a current project I needed to get some custom fields for a loop of posts. Over the last few years I’ve always done the same thing, get_post_meta() right in the post loop. Last week I had a thought to filter ‘the_post’. I’m not 100% this is the best idea yet, but I know it works.

A few concerns that I have:

  1. Running needless processes during a loop.
  2. Adding a level of complication to a simple process.

Here is a gist to display the usage of the class and a link to the github repository.
https://github.com/vc27/AppendPostData/