Tagged: 

Viewing 11 reply threads
  • Author
    Posts
    • #3041
      azizultex
      Member

      Hi,

      I am trying widget but can’t see it in the Admin Panel. below are codes in my widgets subfolder.

      example.php

      <?php
      /*
      Title: My Piklist Widget
      Description: A description of what my widget does
      */
      
       echo $before_widget; 
       
       echo $before_title; 
       
       echo $after_title; 
       
       echo $after_widget;
      
      ?>

      example-form.php

      <?php 
      
      piklist('field', array(
        'type' => 'text'
        ,'field' => 'demo_text'
        ,'label' => 'Title'
        ,'description' => 'Field Description'
        ,'value' => 'Default text'
        ,'attributes' => array(
          'class' => 'text'
        )
      ));
      
      piklist('field', array(
        'type' => 'select'
        ,'field' => 'demo_select'
        ,'label' => 'Select box'
        ,'description' => 'Choose from the dropdown.'
        ,'attributes' => array(
        'class' => 'text'
        )
        ,'choices' => array(
          'option1' => 'Option 1'
          ,'option2' => 'Option 2'
          ,'option3' => 'Option 3'
        )
      ));
      
      piklist('field', array(
        'type' => 'colorpicker'
        ,'field' => 'demo_colorpicker'
        ,'label' => 'Choose a color'
        ,'value' => '#aee029'
        ,'description' => 'Click in the box to select a color.'
        ,'attributes' => array(
          'class' => 'text'
        )
        ));
        
        ?>

      any solution?

      Thanks

    • #3051
      Steve
      Keymaster

      @azizultex– Piklist rolls up all Widgets built within a plugin or theme into ONE widget. For example, if activate Piklist Demos, you will see ONE Widget called “Piklist Demo Widgets”. Once you drag it into the widget area you will see it contains multiple widgets.

      Let me know if you can’t find it.

    • #3054
      azizultex
      Member

      Hi Steve,
      Thanks for your reply. I check but couldn’t find any widget. Please have a look at the attachment.

      Thanks

      Attachments:
      You must be logged in to view attached files.
    • #3056
      Steve
      Keymaster

      Is your widget in your theme? I think it’s the one called “TwentyTwelve Child Theme Widgets”

    • #3057
      azizultex
      Member

      Yes. You are genious. I got it. Actually, I am practicing Piklist in a Twenty Twelve Child Theme. Is there any way so I can change the “TwentyTwelve Child Theme Widgets” name?

      Thanks

    • #3058
      Steve
      Keymaster

      There’s two ways to change the widget name:
      1) Rename your theme.
      2) Place the widgets in an add-on (like we do with Piklist Demos).

    • #3401
      actiontwo
      Member

      HI Steve,
      I create a plugin using piklist to create a widget , but the label of widgets empty, how can i fix

      Regard

      Attachments:
      You must be logged in to view attached files.
    • #3403
      Steve
      Keymaster

      @actiontwo– Welcome to the Piklist community!

      Please post your widget code(both files). Also, we need to know if the files are in a plugin or theme and what the path to these files are.

    • #3409
      actiontwo
      Member

      Hi Steve, Thanks for you feedback
      First file lastest.php

      <?php
      /*
      Title: My Demo Widget ab
      Description: A description of what my widget does
      */
      ?>

      <?php echo $before_widget; ?>

      <?php echo $before_title; ?>

      <?php echo $settings[‘demo_text’]; ?>!

      <?php echo $after_title; ?>

      <?php echo $settings[‘demo_select’]; ?>!

      <?php echo $settings[‘demo_colorpicker’]; ?>!

      <?php echo $after_widget; ?>

      Second file lastest-form.php

      <?php
      piklist(‘field’,
      array(
      ‘type’ => ‘text’
      , ‘field’ => ‘demo_text’
      , ‘label’ => ‘Text box’
      , ‘description’ => ‘Field Description’
      , ‘value’ => ‘Default text’
      , ‘attributes’ => array(
      ‘class’ => ‘text’
      )
      ));

      piklist(‘field’,
      array(
      ‘type’ => ‘select’
      , ‘field’ => ‘demo_select’
      , ‘label’ => ‘Select box’
      , ‘description’ => ‘Choose from the dropdown.’
      , ‘attributes’ => array(
      ‘class’ => ‘text’
      )
      , ‘choices’ => array(
      ‘option1’ => ‘Option 1’
      , ‘option2’ => ‘Option 2’
      , ‘option3’ => ‘Option 3’
      )
      ));

      piklist(‘field’,
      array(
      ‘type’ => ‘colorpicker’
      , ‘field’ => ‘demo_colorpicker’
      , ‘label’ => ‘Choose a color’
      , ‘value’ => ‘#aee029’
      , ‘description’ => ‘Click in the box to select a color.’
      , ‘attributes’ => array(
      ‘class’ => ‘text’
      )
      ));
      ?>

      Attachments:
      You must be logged in to view attached files.
    • #3417
      Steve
      Keymaster

      @actiontwo– Your code is working for me. Please zip up your plugin and email to [email protected] so we can test all your code.

    • #3420
      actiontwo
      Member

      Hi
      Thanks for your feedback,
      I have an attach my plugins,
      By the way, I have another problem with meta-box, I have build a meta-post in page type, when save data in localhost it working but when push my code to server it does not work.

      Regards,

    • #3422
      Steve
      Keymaster

      @actiontwo– I received your plugin. The issue is that the main plugin file name does not match the plugin folder, as recommended by WordPress.org.

      FOLDER: bwf-users-system (users is plural)
      FILE: bwf-user-system.php (user is singular)

      Change your main plugin file to bwf-users-system.php and it will work fine.

      As for your other issue, you’ve already posted it here. Please do not mix support issues.

      Closing this ticket

Viewing 11 reply threads
  • The topic ‘Can't see widget in Admin Panel’ is closed to new replies.