Viewing 1 reply thread
  • Author
    Posts
    • #7494
      jimdonoho
      Participant

      We’re having an issue following the tutorials for creating workflows and tabs.
      Here’s our code, if you can help that would be amazing.

      functions.php in themes folder:

      /**
       * Registering Piklist plugin
       */
        add_filter('piklist_admin_pages', 'piklist_theme_setting_pages');
        function piklist_theme_setting_pages($pages)
        {
           $pages[] = array(
            'page_title' => __('Cabinet Door Shop')
            ,'menu_title' => __('Cabinet Door Shop', 'CDS')
            ,'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' => 'Materials'
            ,'save_text' => 'Save Door Settings', 'Save CDS'
        );
       
          return $pages;
        }

      my-setting-page:

      <?php
      /*
       Title: Materials
       Order: 10
       Tab: Materials
       Setting: my_theme_settings
       Flow: Workflow
       
       */
      piklist('field', array(
        'type' => 'text'
        ,'field' => 'text'
        ,'label' => 'My NEW Door Style'
        ,'description' => 'Door Style Name'
        ,'help' => 'Tell us the door style.'
        ,'value' => 'RP-10'
        ,'attributes' => array(
        'class' => 'text'
        )
       ));
       
      piklist('field', array(
       'type' => 'select'
       ,'field' => 'select 123'
       ,'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' => 'text'
        ,'field' => 'text'
        ,'label' => 'My NEW Door Style'
        ,'description' => 'Door Style Name'
        ,'help' => 'Tell us the door style.'
        ,'value' => 'RP-10'
        ,'attributes' => array(
        'class' => 'text'
        )
       ));
       
      piklist('field', array(
       'type' => 'colorpicker'
       ,'field' => 'colorpicker 123'
       ,'label' => 'Choose a color'
       ,'value' => '#aee029'
       ,'description' => 'Click in the box to select a color.'
       ,'help' => 'This is help text.'
       ,'attributes' => array(
        'class' => 'text'
       )
       ));
       
       piklist('field', array(
       'type' => 'select'
       ,'field' => 'select 456'
       ,'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'
       )
       ));

      my-setting-page1

      <?php
      /*
       Title: Panels
       Order: 30
       Tab: Panels
       Setting: my_theme_settings
       Flow: Workflow
       
       */
      piklist('field', array(
        'type' => 'text'
        ,'field' => 'text'
        ,'label' => 'My NEW Door Style'
        ,'description' => 'Door Style Name'
        ,'help' => 'Tell us the door style.'
        ,'value' => 'RP-10'
        ,'attributes' => array(
        'class' => 'text'
        )
       ));
       
      piklist('field', array(
       'type' => 'select'
       ,'field' => 'select 123'
       ,'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' => 'text'
        ,'field' => 'text'
        ,'label' => 'My NEW Door Style'
        ,'description' => 'Door Style Name'
        ,'help' => 'Tell us the door style.'
        ,'value' => 'RP-10'
        ,'attributes' => array(
        'class' => 'text'
        )
       ));
       
      piklist('field', array(
       'type' => 'colorpicker'
       ,'field' => 'colorpicker 123'
       ,'label' => 'Choose a color'
       ,'value' => '#aee029'
       ,'description' => 'Click in the box to select a color.'
       ,'help' => 'This is help text.'
       ,'attributes' => array(
        'class' => 'text'
       )
       ));
       
       piklist('field', array(
       'type' => 'select'
       ,'field' => 'select 456'
       ,'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'
       )
       ));

      workflow.php

      <?php
      /*
      Flow: Workflow
      Page: custom_settings.php
      Header: true
      Position: title
      */
      

      panels-tab.php

      <?php
      /*
      Title: Panels
      Order: 30
      Flow: Workflow
      */

      materials-tab.php

      <?php
      /*
      Title: Materials
      Order: 10
      Flow: Workflow
      */

      Let me know if you need additional information
      Thanks.

    • #7516
      Jason
      Keymaster

      Hi @jimdonoho!

      Can you please specify which directory each of these files are in?

      Also, what specifically is the problem? Are the tabs showing up with no content in them? Are the tabs not showing up at all? Something else?

Viewing 1 reply thread
  • You must be logged in to reply to this topic.