I’m trying to put together a widget that can present a user with a list posts in a particular custom post type as a dropdown. I’ve gone over the basic widget creation steps and I’m comfortable with that – creating the display, showing a form, saving and retrieving options. What I’m unclear on is how to run a query on the admin side of the widget. I’d like to get a list of posts matching my criteria (ie: post type, is published) which I could then spit out in a loop and put in a select dropdown.
Any pointers? Google is showing me how to do this on the user-facing side of the widget, but nothing on the admin side.
- The topic ‘get list of posts in widget admin panel?’ is closed to new replies.