Forum Replies Created
-
AuthorPosts
-
SteveKeymaster@jason– You can always use an empty HTML field to fill up space in the 12 column grid.
SteveKeymaster@jason– I’m not 100% sure how you want the layout, but I removed one the groups and it looks pretty good. Let me know what you think:
piklist('field', array( 'type' => 'group', 'field' => 'visit-menu', 'label' => 'Visit Menu', 'fields' => array( array( 'type' => 'textarea', 'field' => 'visit-text', 'label' => 'Visit Description', 'columns' => 12, 'attributes'=> array( 'rows' => 4 ) ), array( 'type' => 'text', 'field' => 'visit-link-text', 'label' => 'Visit Link Text', 'columns' => 6, 'sanitize' => array( array( 'type' => 'text_field' ) ) ), array( 'type' => 'text', 'field' => 'visit-link-url', 'label' => 'Visit Link URL', 'columns' => 6, 'validate'=> array( array( 'type' => 'url' ) ) ), array( 'type' => 'group', 'field' => 'internet', 'label' => 'Internet Campus', 'fields' => array( array( 'type' => 'textarea', 'field' => 'internet-text', 'label' => 'Internet Description', 'columns' => 12 ), array( 'type' => 'text', 'field' => 'internet-phone', 'label' => 'Internet Phone Number', 'columns' => 4, 'sanitize' => array( array( 'type' => 'text_field' ) ) ) ) ) ) ));
SteveKeymasterSame here. 😉
SteveKeymasterThe Piklist grid is 12 columns. All fields per row need to add up to 12. It looks like you have 20 columns.
SteveKeymaster@Darlan ten Caten– Not yet… I think we can put something together for you in the next day.
SteveKeymasterYou only need to use the Piklist function if you are going to parse an array of data. Since you are manually creating the choiçes array (list), you can just including it in the array:
,'choices' => array( 'none' => 'Choose your country' ,'ai' => 'Anguilla' ,'ag' => 'Antigua and Barbuda'
Does that make sense?
SteveKeymaster@cosmocanuck– Always work with WP_Debug on. This will help you when developing. As soon as I turned on WP_Debug, I saw the error which was in single-recipe.php you had a typo:
$get_stylesheet_directory()should beget_stylesheet_directory().
SteveKeymaster@mfrie01– The next version of Piklist will support CRUD with frontend forms. List Tables are not ready yet and have been moved down the roadmap. If you want access to the next version of Piklist, please email us at [email protected] and ask to be part of the Beta team.
SteveKeymaster@azizultex– Welcome to the Piklist community! Can you be a bit more specific? What is not working?
SteveKeymaster@igor– Thank you so much! Glad we can help.
If you have the time, we would appreciate it if you could write the same thing at WordPress.org >
SteveKeymaster@igor– Welcome to the Piklist community!
The code you’re using to create the choices just takes the data from
get_posts()and formats it correctly for Piklist, so it looks like this:,'choices' => array( 'key' => 'value' ,'key'=> 'value' ,'key' => 'value' )
To add some instructions as the first choice you can us the standard PHP Union operator, a plus sign
+. So your newchoicesparameter would look like this:,'choices' => array('none' => 'Choose your page') + piklist( get_posts( array( 'post_type' => 'post' ,'orderby' => 'post_date' ) ,'objects' ) ,array( 'ID' ,'post_title' ) )Let us know if you need any more help.
November 30, 2014 at 10:47 am in reply to: Duplicate Basic Tab via User Guide: Add Settings Page Tabs #2891
SteveKeymasterGreat! Let us know is you need anymore help.
SteveKeymasterThis will appear in the next major version of Piklist Demos. Thanks!
SteveKeymasterIt seems to be working now… but I really didn’t do anything. I just downloaded the files and uploaded them again.
Let me know if you need more help.
November 29, 2014 at 10:14 pm in reply to: Duplicate Basic Tab via User Guide: Add Settings Page Tabs #2886
SteveKeymaster@countryipblocks– Welcome to the Piklist community!
To add fields to your
default_tab, do NOT includeTab: Basicin the comment block. Any field files that don’t have theTab:parameter set will automatically be added to thedefault_tab.If you only have one field file, then Piklist will not create tabs.
I updated the tutorial to make this clearer.
Let us know if that helps.
-
AuthorPosts