How to insert current user ID/entry ID into a shortcode?

I haven’t tested this, but you could try this: Put this php in your functions.php. function rt_connections_id () { if ( is_user_logged_in() ) { $usersid = get_current_user_id(); $newout = do_shortcode(‘ [connections id=’.$usersid.’] ‘); } else { $newout=””; } return $newout; } add_shortcode(‘current-user-connections’, ‘rt_connections_id’); Now call it into action by using the shortcode [current-user-connections] INSTEAD of … Read more