Learn to Use Admin Page Framework

Learn the easiest way to create WordPress administration pages with Admin Page Framework! With it, you can even create in-page tabs, forms, meta boxes, custom post types, and widgets etc.

In each tutorial, you’ll write a small plugin using the framework. Each tutorial focuses on teaching a few new main features so you will hardly get lost. In the end, you’ll see how simple and easy to write a plugin with the framework.

16 thoughts on “Tutorials for Admin Page Framework”

Hi Michael,
I’m trying to save a timestamp with the widget every time the widget is updated (or when the save button is pressed). I’d like it to change with every save.
What is the best way to store this parameter and then read it?
Thank you in advance!

Hi Mic,
This seems promising but i think the following is needed from your side on this one:
1-The download from the getting started should download the entire directory at Git, not only the library, and with the fields entered you should have a working barebone plugin similar to Devin Vinson boilerplate.
2-The entire files hierarchy should be described in details.
Thanks for your effort on this one.

Now I need to retrieve that URL so that I can place it on the profile page (front end). I have been able to create shortcodes for all of the text fields I have created within this form, but the “image” field type seems to just come back blank.

Is the set URL in the properly displayed in the form field? You set an image in the image input field and save the form. Then when the next page loads, the set image URL should be filled. If you see an empty input for the image field, it means the form failed to save/retrieve the data. If you see the set URL in the field, then you should be able to retrieve the data with the get_option() function.

I’d suggest you try var_dump the $data variable. Then check if you can see the set URL in that output. You may want to use AdminPageFramework_Debug::log( $data ); instead so that the full contents will be dumped in a file in the wp-content directory. To use that you need to enable WP_DEBUG in wp-config.php.

Hi, just posted a new tutorial for your request! http:/admin-page-framework.michaeluno.jp/admin-page-framework/tutorials/4-upload-images/

Regarding the question about linking the uploaded images to a taxonomy, I don’t quite get what you mean. The uploaded image is stored in the media library ( Media -> Library ). By default, they don’t have a taxonomy.

On a similar note I just ran into this myself.. it would be nice to be able to save the attachment_id instead of the url. I had to create a function to get the attachment_id from the URL when trying to view the images on the customer side. On a different note.. what happened to your donate button!? 🙂

To save the attachment id of an uploaded picture, it should be already possible with the attributes_to_store argument of the image field type. Check out the example in the demo via Dashboard -> Built-in Field Types -> Demo -> Files -> Save Image Attributes.