WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Ruben Woudsma
    Member
    Posted 5 months 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'

    http://wordpress.org/plugins/people-page/

  2. jethin
    Member
    Plugin Author

    Posted 5 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.