- This topic has 3 replies, 2 voices, and was last updated 4 years, 12 months ago by
Steve.
-
AuthorPosts
-
-
February 1, 2017 at 2:22 am #7775
solaceParticipantHi,
I’d like to be able to create a Dashboard QuickPress/Add New Post widget equivalent for a CPT that I have created with Piklist.
From the looks of it I’ll need to create a
forms/part for the form, and use a shortcode in adashboard/part to load it. Is this correct?I essentially want it to be handled in the same way as a standard Add New post submission where it submits to
post-new.php, only from a widget, which means I’ll need the standard hidden fields that are populated on the standard form (ie. nonce, user-id, post-author etc). Is there a quick way to build these or do I need invokefield()for each?I’ve gotten as far as:
/* Action: post-new.php Capability: edit_posts Network: false */ piklist( 'field', array( 'type' => 'text', 'field' => 'post_title', 'scope' => 'post', 'label' => 'Title' ) ); <the same custom fields I have in my CPT metaboxes> piklist('field', array( 'type' => 'submit', 'field' => 'submit', 'value' => 'Submit' ));My apologies if I have missed the documentation for this somewhere.
Thanks
-
February 9, 2017 at 11:18 pm #7782
-
February 10, 2017 at 12:04 am #7783
solaceParticipantHi Steve,
Thanks. And to confirm, I need to create a
field()for each of standard hidden fields manually? No shortcut for this?Thanks
-
February 10, 2017 at 12:10 am #7784
SteveKeymasterThat’s correct. Use this as a guide >
You can just copy and paste.
-
-
AuthorPosts
- You must be logged in to reply to this topic.