apple-desk-laptop-working

Tutorials for Admin Page Framework

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.

Tutorial Index

  1. Create a WordPress Admin Page
  2. Create a Setting Form
  3. Create a Page Group
  4. Create In-page Tabs
  5. Organize a Form with Sections
  6. Creating Repeatable Section Tabs
  7. Validating Field of Submitted Form
  8. Validating Fields of Submitted Form
  9. Add a Meta Box to an Admin Page
  10. Add a Meta Box to an In-page Tab
  11. Add a Meta Box for Posts
  12. Create Custom Post Type and Custom Taxonomy
  13. Create a Meta Box for a Custom Post Type

Upcoming Tutorials

  1. Create Fields in Taxonomy Definition Page
  2. Create a Widget
  3. Add Tabs to Another Plugin’s Page
  4. Modify Another Plugin’s Page
  5. Export and Import Option Settings
  6. Add Links to Plugin Listing Table
  7. Set Custom Text in the Footer of the Page
  8. Create Your Own Field Type

More tutorials will come soon so stay tuned!

Don’t find what you are Looking for?

In case you cannot find what you want to do, leave your tutorial requests in the below comment section! If you get stuck, ask questions in the support forum.

11 thoughts on “Tutorials for Admin Page Framework”

  1. Greetings. Hope I can get some quick assistance here. Kind of time critical. Would be happy to leave a donation If I can get this to work. So I have create a form input for profile pic

    array( // Getting A Custom About Us Page Image
    'field_id' => 'consultant-profile-pic',
    'type' => 'image',
    'title' => __( 'About Us Page Image', 'admin-page-framework-loader' ),
    'description' => __( 'Set A Custom About Me Page Image', 'admin-page-framework-loader' ),
    ),

    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.

    // Add Shortcode Consultants Profile pic
    add_shortcode( 'consultant_profile_pic' , 'fn_get_consultant_pic' );
    function fn_get_consultant_pic(){
    $data = get_option( 'DB_Custom_Ident', array() );
    $cbtconsultantpic = customizemymcc_AdminPageFramework::getOption( 'DB_Custom_Ident', 'consultant-profile-pic', 'default' );
    return $cbtconsultantpic;
    }

    Suggestions?

    1. Hi,

      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.

        1. @Blair2004,

          I’ve posted new tutorial articles including custom post types. Hope it helps! Sorry for taking so long to write them.

  2. I think it would be great demonstration on how to upload images using the admin panel framework.

    Is there any way to link the uploaded images to a category or tag?

    Thanks.

    1. 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.

      1. 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!? :)

        1. Hey Rick,

          Thanks for the donation!

          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.

          You would set it like this.

          If you need help with that, post a new topic on the forum.

Leave a Reply

Your email address will not be published. Required fields are marked *