Forum Replies Created

Viewing 15 posts - 16 through 30 (of 52 total)
  • Author
    Posts
  • in reply to: 0.10 Beta 2 Release #8054

    Thanks for all the hard work, Jason and team. You’ve all saved us time, energy and tears.

    in reply to: Related posts vs postmeta? #7913

    I see what you’re trying to do and have tried something similar myself (editing a related post meta in the parent) but wasn’t able to do so in any clear or useful way only via piklist.

    I’m also having issues with the conditionals using addmores and nested groups. I’ve just decided to wait until the feature is released (hopefully soon.)

    in reply to: OK to Update? #7912

    I updated from the same version and have a ton of code that works just fine.

    in reply to: Nested add_more group with conditional #7911

    Having this same issue. Need nested fields as I also need the rearrange (drag n drop order) option. However, I also need the show/hide functionality but it’s not working on 0.9.9.12.

    in reply to: update multiple from resulting post selection #7906

    Anyone have any advice here? I’d love to get that selected option back but am not sure just how to do so.

    in reply to: update multiple from resulting post selection #7895

    I think this post is similar.

    update multiple from resulting post selection

    I’m trying to get the selected post so I can update the other fields. It looks like you solved it but it was done via email and not posted in the forum.

    Let me know how it’s possible.

    Thanks, Steve!

    in reply to: update multiple from resulting post selection #7890

    Thanks steve, I should have been clearer. I am trying to get access to what was selected in the view as the option.

    For this part:

    'type' => 'select'
        ,'field' => 'update_multiple'
        ,'label' => __('Update Multiple Fields', 'piklist-demo')
         ,'choices' => piklist(
                                 get_posts(array(
                                    'post_type' => 'event'
                                    ,'numberposts' => -1
                                    ,'orderby' => 'title'
                                    ,'order' => 'ASC'
                                ))
                                ,array('ID', 'post_title')
                            )

    How do I get the post that was selected? Do I need to use jquery or does piklist return it somehow?

    in reply to: Unique Value in Term Meta #7869

    Super helpful, Jason. Close this puppy out!

    in reply to: Unique Value in Term Meta #7867

    I’m actually storing urls, not ids. However, your second post makes sense. Let me play with that and get back to you.

    Thanks for the response.

    in reply to: Unique Value in Term Meta #7864

    Yes, I want to add multiple values for a key. What type of field does this? And are there docs that help understand which is which?

    I’m currently using:

    
      piklist('field', array(
        'type' => 'file'
        ,'field' => 'featured_media_url'
        ,'label' => __('Featured Media Url', 'piklist-demo')
        ,'attributes' => array(
          'class' => 'regular-text'
    	   ,'readonly' => 'readonly'
        )
      ));
    in reply to: User to post relationship #7846

    Bump. Any suggestions on this?

    in reply to: Repeating metaboxes with add more #7807

    Thanks. However, I don’t want to repeat fields. I want to repeat an entire metabox.

    in reply to: User to post relationship #7795

    Hey Steve, sorry to drudge up this post but took some time off and just getting back to this.

    How would I go about getting a list of posts related to the user on the frontend?

    I’ve tried this (some code excluded for brevity):

      
    
        $user_id = get_current_user_id();
        $key = '__relate_post';
        $single = false;
    
      $user_posts = get_user_meta($user_id, $key, $single );
    
    $related_proposals = get_posts(array(
          'post_type' => 'proposal' // Set post type you are relating to.
          ,'posts_per_page' => -1
          ,'post_belongs' => $user_id
          ,'post_status' => 'publish'
          ,'suppress_filters' => false // This must be set to false
      ));
      
    
      $output = '';
    
      if (!empty($related_proposals) ) { 
     
          $output .= '<ul>';
    
          foreach($related_proposals as $related_proposal) {
            $output .= '<li><a href="'.get_post_permalink($related_proposal->ID).'">'.$related_proposal->post_title.'</a></li>';
          }
          
          $output .= '</ul>';
      }
    
    return $output

    The above returns absolutely nothing.

    and then I tried this:

      
    
        $user_id = get_current_user_id();
        $key = '__relate_post';
        $single = false;
    
      $user_posts = get_user_meta($user_id, $key, $single );
    
    $related_proposals = get_posts(array(
          'post_type' => 'proposal' // Set post type you are relating to.
          ,'posts_per_page' => -1
          ,'post_belongs' => $user_posts
          ,'post_status' => 'publish'
          ,'suppress_filters' => false // This must be set to false
      ));
      
    
      $output = '';
    
      if (!empty($related_proposals) ) { 
     
          $output .= '<ul>';
    
          foreach($related_proposals as $related_proposal) {
            $output .= '<li><a href="'.get_post_permalink($related_proposal->ID).'">'.$related_proposal->post_title.'</a></li>';
          }
          
          $output .= '</ul>';
      }
    
    return $output

    This returns all posts for the type- not just the ones associated.

    And then tried this:

      
    
        $user_id = get_current_user_id();
        $key = '__relate_post';
        $single = false;
    
      $user_posts = get_user_meta($user_id, $key, $single );
    
    $related_proposals = get_posts(array(
          'post_type' => 'proposal' // Set post type you are relating to.
          ,'posts_per_page' => -1
          ,'include' => $user_posts
          ,'post_status' => 'publish'
          ,'suppress_filters' => false // This must be set to false
      ));
      
    
      $output = '';
    
      if (!empty($related_proposals) ) { 
     
          $output .= '<ul>';
    
          foreach($related_proposals as $related_proposal) {
            $output .= '<li><a href="'.get_post_permalink($related_proposal->ID).'">'.$related_proposal->post_title.'</a></li>';
          }
          
          $output .= '</ul>';
      }
    
    return $output

    and using “include” rather than post_belongs works but if there’s no ids in the array from the user meta, then all posts show up.

    None of these do what I intend. I just want to show only the posts that we’ve related to the user.

    You really need better docs on this relate stuff! 😉

    in reply to: User to post relationship #7708

    Thanks, Steve and happy new year!

    This just seems to create an empty field on the view in wp-admin. I tried changing the type to checkbox but notta.

    Any suggestions or do you have any learning guides on the relate system? I can only seem to find things in the forum and only in bits and pieces.

    in reply to: Where can I hire a Piklist expert? #6039

    What are you trying to do, exactly?

Viewing 15 posts - 16 through 30 (of 52 total)