Forum Replies Created

Viewing 15 posts - 706 through 720 (of 2,964 total)
  • Author
    Posts
  • in reply to: Shortcode button saving shortcode to wrong editor #6952
    Steve
    Keymaster

    @upside– Always great to hear from Piklist fans!

    scope does a lot, but in simplest terms, it tells Piklist where to save data.

    "scope" => "post": saves to wp_post table
    "scope" => "page": does nothing since the table doesn’t exist.

    In your case, the editor field is actually post_meta:
    "scope" => "post_meta"

    Or if you’re in the admin you can just leave it out since Piklist is smart enough to figure it out.

    in reply to: Edit in backend an image uploaded in frontend #6951
    Steve
    Keymaster

    great. glad you got it working.

    setting the scope parameter on front end forms is mandatory so Piklist knows where to save the data.

    Steve
    Keymaster

    @pionect– We’re aware of this issue and it’s something on our list of todo’s. Sorry for the inconvenience.

    in reply to: File upload fields not working in settings pages #6949
    Steve
    Keymaster

    @semwangajoshua– Sorry you’re having issues. Since you’re the only one reporting this I’m guessing this has to do with your server setup or a conflicting plugin/theme. Did you try deactivating other plugins and switching to the WordPress default theme?

    in reply to: Serialize checkbox data #6938
    Steve
    Keymaster

    @bshep– You could save the field as a group field, with the checkbox field being the only field in the group.

    OR

    You can just leave it the way it is, and use get_post_meta() with the last parameter set to false. This would give you the data back as an array: get_post_meta(get_the_ID(), 'my_field', false)

    Piklist saves it like this because the data is flexible. If you want to query on the data you can. Saving it as a serialized array removes the ability to query it.

    in reply to: Save field as a number no string #6936
    Steve
    Keymaster

    That’s odd. When I use that field, pull the value and use in an equation it works for me.

    in reply to: May have found a bug with shortcodes #6934
    Steve
    Keymaster

    Wow! What a find. I updated the local repo for the next major release.

    Thanks!

    in reply to: Save field as a number no string #6933
    Steve
    Keymaster

    @hartey11– Piklist supports are HTML5 fields, including number:

      piklist('field', array(
        'type' => 'number'
        ,'field' => 'my_number'
        ,'label' => 'Enter a number'
      ));
    
    in reply to: Front End Form Saving to Current Post ID #6932
    Steve
    Keymaster

    Looks good!

    in reply to: How to get data from settings page to show on frontend #6931
    Steve
    Keymaster

    Perfect!

    Since Piklist does everything the WordPress and PHP way, that code will work on any array. Not just Piklist.

    Closing ticket.

    in reply to: How to get data from settings page to show on frontend #6923
    Steve
    Keymaster

    Looks like $stmp_postn1_vsb is an array. To see the value use print_r instead of echo: print_r($stmp_postn1_vsb);

    To use it you will need to loop over the array using foreach.

    in reply to: Display Taxonomy fields in template #6922
    Steve
    Keymaster

    @amristar– Welcome to the Piklist community!

    You can use the WordPress function get_term_meta().

    in reply to: Modifying the WP comment form #6920
    Steve
    Keymaster

    I just tried hooking to these functions, and the field renders but it doesn’t save.

    Looks like a bug. I’ll put in a ticket for it but it may take a while.

    in reply to: Modifying the WP comment form #6919
    Steve
    Keymaster

    @morganrt– You don’t need to drop in a shortcode, you can just use a Piklist field. I’m not exactly sure which hook to use, but the function can look like this:

    function extra_comment_fields() {
    	piklist('field', array(
    		'type' => 'text'
    		,'field' => 'my_label'
    		,'scope' => 'comment_meta'
    		,'label' => 'My label'
    	));
    }
    

    This can go in your functions.php file.

    Let us know if this works for you and which hook you ended up using.

    in reply to: Metaboxes in tabbed Settings Pages not showing #6917
    Steve
    Keymaster

    So, glad it’s working. Please review them… you were close 😉

    Closing this ticket.

Viewing 15 posts - 706 through 720 (of 2,964 total)