How I understand it should be added like argument for the field you create. An example with wysiwyg:
$content = get_term_meta( $term->term_id, 'shipping_wysiwyg', true);
wp_editor(htmlspecialchars_decode($content) , 'shipping_wysiwyg', array(
"media_buttons" => true,
"add_to_wpseo_analysis" => true
));
It’s a field, which I added to the taxonomy term.
But for me it doesn’t work. I don’t know what I am doing wrong..
Thread Starter
svaika
(@svaika)
Here is a code:
function name_shortcode( $atts ) {
global $current_user;
$user_id = ( is_user_logged_in() ? $current_user->ID : NULL );
extract( shortcode_atts( array(
'id' => $user_id,
), $atts ) );
return get_userdata($id)->user_login;
}
add_shortcode('name', 'name_shortcode');
May someone will be useful. To get user name use shortcode [name id=”here_insert_user_id”]
Thread Starter
svaika
(@svaika)
Any ideas how to solve it?