1) Put this filter into functions.php and add ALL user-fields, which should be translated:
add_filter( 'wpml_translatable_user_meta_fields', 'add_usermeta', 99); function add_usermeta( $fields ) { $fields = array('description','wpcf-my-custom-field'); return $fields; }
2) Add the shortcode for displaying the user-fields in functions.php
add_shortcode( 'user-meta', 'user_meta_func'); function user_meta_func($atts) { $key = $atts['key']; $id = $atts['id']; return get_the_author_meta($key, $id); }
3) Add the shortcode in Toolset (Settings > Frontend > Shortcode-Arguments)
4) Add the shortcode wherever your fields should appear (in View, Layout, Page ...)
[user-meta id="[wpv-user field='ID']" key="description"] [user-meta id="[wpv-user field='ID']" key="wpcf-my-custom-field"]
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 9 réponses, has 2 voix.
Last updated by dianaM-4 Il y a 6 années et 10 mois.
Assisted by: Christian Cox.