People Page
[resolved] How: fill $people array based upon query (2 posts)

  1. Ruben Woudsma
    Posted 2 years ago #

    I am looking into this plugin and trying it out for one of my websites I am working on. I have noticed that you are storing all the users from WordPress into an array attached to the heading of a post/page.

    Would it also be possible to fill the array in another way? E.g. based upon a query for all users with a specific role and/or authorization?

    E.g. something like this:

    $people = SELECT id from users where usermetafield = 'cat-manager'


  2. jethin
    Plugin Author

    Posted 2 years ago #

    Hi Ruben,

    I'm away from my office (and therefore my code base) but yes, I believe what you suggest should work (though I haven't tested your query.) The $people array is a simple array of user ids. These id values are attached to a specific page/post via the "People" meta box that is available on pages that use the People Page template. So, in theory you could overwrite this array (in the plugin) with the user ids you want displayed. You'll need to overwrite the $people array in at least two locations in the plugin code.

    Let us know how it goes.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • People Page
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.