- This topic has 3 replies, 3 voices, and was last updated 6 years, 3 months ago by
Steve.
Viewing 3 reply threads
-
AuthorPosts
-
-
November 4, 2015 at 2:52 am #4855
hozefasmileMemberHi,
I am using piklist beta 0.9.9.6
I have followed the documentation and first added this code in theme’s functions.php file
add_filter('piklist_admin_pages', 'piklist_theme_setting_pages'); function piklist_theme_setting_pages($pages) { $pages[] = array( 'page_title' => __('Custom Settings') ,'menu_title' => __('Settings', 'piklist') ,'sub_menu' => 'themes.php' //Under Appearance menu ,'capability' => 'manage_options' ,'menu_slug' => 'custom_settings' ,'setting' => 'my_theme_settings' ,'menu_icon' => plugins_url('piklist/parts/img/piklist-icon.png') ,'page_icon' => plugins_url('piklist/parts/img/piklist-page-icon-32.png') ,'single_line' => true ,'default_tab' => 'Basic' ,'save_text' => 'Save Demo Settings' ); return $pages; }Then I created two files under theme folder/piklist/parts/settings/
1. my-settings-section.php<?php /* Title: Theme Settings Section Setting: my_theme_settings */ piklist('field', array( 'type' => 'text' ,'field' => 'text' ,'label' => 'Text Box' ,'description' => 'Field Description' ,'help' => 'This is help text.' ,'value' => 'Default text' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'select' ,'field' => 'select' ,'label' => 'Select Box' ,'description' => 'Choose from the drop-down.' ,'help' => 'This is help text.' ,'attributes' => array( 'class' => 'text' ) ,'choices' => array( 'option1' => 'Option 1' ,'option2' => 'Option 2' ,'option3' => 'Option 3' ) )); piklist('field', array( 'type' => 'colorpicker' ,'field' => 'colorpicker' ,'label' => 'Choose a color' ,'value' => '#aee029' ,'description' => 'Click in the box to select a color.' ,'help' => 'This is help text.' ,'attributes' => array( 'class' => 'text' ) )); ?>2. my-settings-2.php
<?php /* Title: My Settings Section Setting: my_theme_settings Tab: Advanced */ // Let's create a text box field piklist('field', array( 'type' => 'text' ,'field' => 'field_name003' ,'label' => __('Example Field 3') ,'description' => __('Field Description') ,'attributes' => array( 'class' => 'text' ) )); // Let's create a text box field piklist('field', array( 'type' => 'text' ,'field' => 'field_name004' ,'label' => __('Example Field 4') ,'description' => __('Field Description') ,'attributes' => array( 'class' => 'text' ) )); ?>Thanks
Hozefa -
November 4, 2015 at 3:23 pm #4860
kplanetaMemberTo make tabs work you need to set up a workflow. It’s all written in the docs.
-
November 4, 2015 at 11:31 pm #4873
SteveKeymasterThis reply has been marked as private. -
November 4, 2015 at 11:32 pm #4874
SteveKeymaster
@kplaneta is correct. Follow this doc on building Workflows.
-
-
AuthorPosts
Viewing 3 reply threads
- You must be logged in to reply to this topic.