Forum Replies Created
- 
AuthorPosts
 - 
jcristMemberLooks like it was another plugin which caused the issue, Libsyn. Sorry for the confusion but thanks for the reply!
jcristMemberYou could use geocomplete to create geo fields in piklist, I’ve used it on a few sites. The form population is helpful.
jcristMemberI should have given more background…What I’d like to do is conditionally show meta-boxes based on the Site Type which the user selects on tab 1. I found this this thread which pointed me in the right direction.
Here’s what I’m trying:
add_filter('piklist_part_data_parameter', 'site_type_filter', 10, 2); function site_type_filter($value, $parameter) { if($parameter == 'site_type') { $value = piklist::explode(',', $value, 'strtolower'); $value = array_filter($value); $value = empty($value) ? null : $value; } return $value; }Then I’m printing out the part array:
add_filter('piklist_part_process-settings', 'show_part_array', 20, 2); function show_part_array( $part ) { print_r($part); return $part; }But ‘site_type’ is not in the array. Looks like I don’t know how to properly use this filter, could you post a code sample?
Also, once I this this working, I would use the ‘piklist_part_process’ filter to unset the part if it shouldn’t be shown?
jcristMemberThanks Steve, it does work well though my question is more geared toward not allowing the multiple files at all, exactly like WordPress’ Featured Image field.
I know that it would take some re-working of the file field but I thought I would ask having to create a new field for this 🙂
jcristMemberSorry to bump an old thread but is still on the todo list? 9.9 is amazing btw
September 18, 2015 at 8:48 am in reply to: Setting menu-icon on custom post declaration not working #4354
jcristMemberShould be ‘menu_icon’ instead of ‘menu-icon’ (notice the underscore).
jcristMemberAs far as I can tell Piklist can add custom meta boxes to the edit screen of taxonomy (enable the demo, add a demo taxonomy then edit it) but currently does not add to the add new taxonomy form. A quick google search yielded this tutorial https://pippinsplugins.com/adding-custom-meta-fields-to-taxonomies/
jcristMemberYou can use this: https://github.com/tommusrhodus/FontAwesome-4.3.0-Class-Names/blob/master/array.php
to create a select meta-box like this:
piklist('field', array( 'type' => 'select' ,'field' => 'font-awesome-icon' ,'label' => __('Icon', 'piklist-demo') ,'choices' => ebor_icons_list() ));Then show the icon like this:
<?php $font_awesome_icon = get_post_meta(get_the_ID(), 'font-awesome-icon'); ?> <i class="fa <?php echo $font_awesome_icon; ?>"></i>And if you want to get real fancy: http://mjolnic.com/fontawesome-iconpicker/
June 16, 2015 at 11:21 am in reply to: Stoping Custom Post Types from using default "Post" structure #3881
jcristMemberTry setting ‘with_front’ => false in your rewrite args – http://codex.wordpress.org/Function_Reference/register_post_type#rewrite
jcristMemberI believe they are using the Easy Digital Downloads plugin for the My Account pages
jcristMemberYou can use the template field parameter to accomplish this, look through them in includes/class-piklist-form.php
If one of the pre-made templates doesn’t suit your needs, you can create your own: https://piklist.com/user-guide/docs/field-templates/
Also be sure to look through the Piklist demo files to see some examples.
jcristMemberI ended up using attachment_fields_to_edit filter and adding the fields I needed. This saved me from having to use a repeater as the user can select any images they would like. However a new problem arose in that after adding the images, if you click on an image to edit the fields you are taken to the add new image screen instead without the image selected, so selecting it adds the images again 🙁
jcristMemberI was having the same issue with a similar setup — a grouped repeater field with a file upload. The first image returned fine but the rest would return with [0] => undefined, [1] => 123.
I ended up changing the setup and utilizing the built-in Media Details instead.
jcristMemberSince Piklist does thing the WordPress way, you would use get_post_meta(). get_field() on the other hand is a function only available in ACF.
<?php $image = get_post_meta(get_the_ID(),'image',true); if( !empty($image) ) : ?> <img src="<?php echo $image; ?>" alt="" /> <?php endif; ?>
jcristMemberThis should do it:
$choices = piklist( get_terms('gwfg_video_type', array( 'hide_empty' => false )) ,array( 'term_id' ,'name' )); $choices[-1] = 'All Categories'; ksort($choices); piklist('field', array( 'type' => 'select' ,'field' => 'category' ,'label' => 'Categories' ,'conditions' => array( array( 'field' => 'gwfg_carousel_content_type' ,'value' => 'videos' ) ) ,'choices' => $choices )); - 
AuthorPosts