Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm building a project management web app using WordPress. I want to create a kind of "news feed" on the home page so that everyone can see what the latest posts added/edited were. I need this to work with custom fields too (specifically, I'm using advancedcustomfields).

An example of what I'm trying to do:

  1. Rick created a new get_post_type() called get_the_title() on get_the_time()
  2. Jim changed the Due Date of Client Print Ad from 3/5/13 to 3/2/13

For additions (#1 above), this is really easy. new WP_Query(array('post_type' => 'any', 'numberposts' => '-1', 'posts_per_page' => '-1', 'orderby' => 'date'))

and then loop through.

For edits (#2 above), I'm finding this to be more challenging. Obviously I can see if this is an edit, but I'm having trouble getting the exact edits. I'm thinking of doing add_action('save_post', 'insert_activity') and inserting some kind of string to post_meta, but I don't know if that's the best solution or if its redundant with capabilities already built in.

Has anyone tried to do this before? I know WordPress has the built in revision manager where you can compare revisions, but what is the best way to compare this on the front end? How does this work with custom fields?

share|improve this question

1 Answer 1

From your description what you are looking for is a feed of activity. It might be easier for you to customize buddypress, which already have an activity feature, than to develop one from scratch. I'm sure you can turn off the social features that you don't need.

share|improve this answer
    
I appreciate the response, but I'm not looking for easier. I want to integrate this with a whole bunch of other mini web apps created in WordPress, so the unique requirements make buddypress unsuitable. –  LOLapalooza Feb 25 '13 at 18:08
    
Nothing prevents you from copying the relevant parts from buddypress. It is supposed to be modular. –  Mark Kaplun Feb 25 '13 at 19:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.