Tagged: field template
- This topic has 3 replies, 2 voices, and was last updated 6 years, 11 months ago by
Steve.
Viewing 3 reply threads
-
AuthorPosts
-
-
March 2, 2015 at 11:30 pm #3378
pupppetMemberThis template to remove the group label (allowing a full width row) I found in the forum no longer seems to work-
add_filter('piklist_field_templates', 'add_piklist_field_templates'); function add_piklist_field_templates($templates) { $templates['no_label'] = '[field_wrapper] <div id="%1$s" class="%2$s"> [field_description_wrapper] <small>[field_description]</small> [/field_description_wrapper] [field] </div> [/field_wrapper]'; return $templates; }Any idea what needs to be updated?
-
March 4, 2015 at 11:09 am #3383
-
March 5, 2015 at 5:56 pm #3385
pupppetMemberI’m on 0.9.4.25.
-
March 6, 2015 at 3:36 pm #3389
SteveKeymaster@pupppet– The format for Field Templates changed a while ago. Please refer to the official docs in the future >
The code you need is:
add_filter('piklist_field_templates', 'add_piklist_field_templates'); function add_piklist_field_templates($templates) { $templates['no_label'] = array( 'name' => __('No Label', 'piklist') ,'description' => __('No label here.', 'piklist') ,'template' => '[field_wrapper][field_description_wrapper] [field_description] [/field_description_wrapper] [field][/field_wrapper]' ); return $templates; }
-
-
AuthorPosts
Viewing 3 reply threads
- You must be logged in to reply to this topic.