Tagged: widgets
- This topic has 11 replies, 3 voices, and was last updated 6 years, 11 months ago by
Steve.
-
AuthorPosts
-
-
December 11, 2014 at 6:28 am #3041
azizultexMemberHi,
I am trying widget but can’t see it in the Admin Panel. below are codes in my
widgetssubfolder.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
-
December 11, 2014 at 1:20 pm #3051
SteveKeymaster@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.
-
December 11, 2014 at 1:37 pm #3054
-
December 11, 2014 at 1:44 pm #3056
SteveKeymasterIs your widget in your theme? I think it’s the one called “TwentyTwelve Child Theme Widgets”
-
December 11, 2014 at 1:48 pm #3057
azizultexMemberYes. 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
-
December 11, 2014 at 1:58 pm #3058
SteveKeymasterThere’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). -
March 9, 2015 at 12:12 am #3401
-
March 9, 2015 at 10:12 am #3403
SteveKeymaster@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.
-
March 9, 2015 at 10:03 pm #3409
actiontwoMemberHi 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. -
March 10, 2015 at 10:05 am #3417
SteveKeymaster@actiontwo– Your code is working for me. Please zip up your plugin and email to [email protected] so we can test all your code.
-
March 10, 2015 at 10:10 am #3420
actiontwoMemberHi
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,
-
March 10, 2015 at 10:43 am #3422
SteveKeymaster@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.phpand it will work fine.As for your other issue, you’ve already posted it here. Please do not mix support issues.
Closing this ticket
-
-
AuthorPosts
- The topic ‘Can't see widget in Admin Panel’ is closed to new replies.