Forum Replies Created

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • in reply to: CSS Issues in Admin #9552
    jcrist
    Member

    Looks like it was another plugin which caused the issue, Libsyn. Sorry for the confusion but thanks for the reply!

    in reply to: Any Geo Related Options? #5958
    jcrist
    Member

    You could use geocomplete to create geo fields in piklist, I’ve used it on a few sites. The form population is helpful.

    in reply to: Comment Block #5369
    jcrist
    Member

    I 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?

    in reply to: [Request] Limit to single file #5260
    jcrist
    Member

    Thanks 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 🙂

    in reply to: [Request] Limit to single file #5241
    jcrist
    Member

    Sorry to bump an old thread but is still on the todo list? 9.9 is amazing btw

    in reply to: Setting menu-icon on custom post declaration not working #4354
    jcrist
    Member

    Should be ‘menu_icon’ instead of ‘menu-icon’ (notice the underscore).

    in reply to: Adding tax meta field on new tax form #4108
    jcrist
    Member

    As 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/

    in reply to: metabox select for font awesome #4107
    jcrist
    Member

    You 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/

    jcrist
    Member

    Try setting ‘with_front’ => false in your rewrite args – http://codex.wordpress.org/Function_Reference/register_post_type#rewrite

    in reply to: Users, the admin menu and conditional content #3715
    jcrist
    Member

    I believe they are using the Easy Digital Downloads plugin for the My Account pages

    in reply to: Group fields – columns #3705
    jcrist
    Member

    You 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.

    in reply to: File Upload – Undefined item #3625
    jcrist
    Member

    I 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 🙁

    in reply to: File Upload – Undefined item #3616
    jcrist
    Member

    I 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.

    in reply to: Conditional if/else for Front End #3599
    jcrist
    Member

    Since 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; ?>
    in reply to: Taxonomy Dropdown List – All categories option #3597
    jcrist
    Member

    This 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
      ));
Viewing 15 posts - 1 through 15 (of 27 total)