- This topic has 5 replies, 2 voices, and was last updated 6 years, 4 months ago by
Steve.
-
AuthorPosts
-
-
October 6, 2015 at 4:14 pm #4427
cezarionMemberHello,
Actually if validation failed on piklist metabox, the post is publishing.
Did you know how can I prevent this post status and apply an another one.Thank’s for your help.
-
October 6, 2015 at 4:18 pm #4429
SteveKeymasterThat shouldn’t happen. Are you sure it’s publishing? Is it already published?
Please test with the Piklist Demos and see if it’s the same.
If you are still having an issue please post your code here.
-
October 6, 2015 at 4:54 pm #4430
cezarionMemberI have activate piklist demo, and it’s not publishing; The custom post type have status ‘new’.
My custom post type are not build with piklist. I used the Themosis Framework to create custom post type.
Piklist is more advanced in the creation of field in custom metabox.But I’m sure the post is publishing.
Themosis method use a wrapper to create metabox, but it’s the default wordpress custom post type how are defined.Does it work on the demonstration because an new custom status is set ?
Create the custom post type
PostType::make('media-brand', 'Medias Brands', 'Media brand')->set(array( 'public' => true, 'menu_position' => 10, 'supports' => ['title','thumbnail'], 'rewrite' => true, 'query_var' => false, 'has_archive' => false, 'menu_icon' => 'dashicons-welcome-view-site' ));A metabox :
<?php /* Title: Contents Post Type: media-brand, case-study, offer, geographic-universe, contents-universe Context: normal Order: 2 Lock: true Collapse: false */ piklist('field', array( 'type' => 'textarea' ,'field' => 'heading' ,'label' => 'Chapeau' ,'description' => 'Entrez le chapeau du contenu.' ,'attributes' => array( 'rows' => 10 ,'cols' => 50 ,'class' => 'large-text' ) ,'required' => true )); piklist('field', array( 'type' => 'editor' ,'field' => 'description' ,'label' => __('Description') ,'description' => __('Entrez le contenu.') ,'value' => '' ,'options' => array ( 'wpautop' => true ,'media_buttons' => true ,'tabindex' => '' ,'editor_css' => '' ,'editor_class' => '' ,'teeny' => false ,'dfw' => false ,'tinymce' => true ,'quicktags' => true ) ,'required' => true )); -
October 6, 2015 at 5:08 pm #4432
-
October 6, 2015 at 5:12 pm #4433
cezarionMemberThank’s a lot.
You’re plugin is really great. Long ago I had not code with WordPress and that I had not used.
It is with pleasure that I reuses. -
October 8, 2015 at 9:53 am #4466
SteveKeymaster@cezarion– We added a feature to the latest version of Piklist. Read about it here >
Let us know if it works for you.
-
-
AuthorPosts
- You must be logged in to reply to this topic.