Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » Was types_render_field with a post ID ever implemented?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey Joshua,

    I was looking for the same thing. I know from past experience, that OnTheGoSystems prefers to use there own support system. Good luck with all that—it’s pretty painful. Anyway, I just figured out a hack that works for me, try it and let me know if it works for you too:

    1. open up embedded > frontend.php
    2. in the types_render_field function, after global $post; (around line 57) add the following:
      //set post_id
          $post_id = $post->ID;
              $post_id = $params['post_id'];
    3. change all instances of$post->ID to $post_id in the rest of the function:
      • around line 78: $meta = get_post_meta($post_id,
      • around line 126: $params['field_value'] = get_post_meta($post_id,
    4. now you can juist add the post_id into the params array like so:
      echo types_render_field('robot-avatar', array('post_id' => $robot_id, 'size' => 'thumbnail'));

    Hope this works for you, please let us know!

    Plugin Author Amir Helzer


    Why is our support forum painful?

    I’m adding this patch to our development queue and want to see what else it might effect.

    well .. i am using this :

    $variable = do_shortcode("[types field='field_slug' id='post_id']");

    i didnt want to edit the plugin code .. anyone has any input if using do_shortcode isnt a good idea ?

    Hi Baden,

    your email … ? for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Was types_render_field with a post ID ever implemented?’ is closed to new replies.