My bad, sorry, the attribute to use is not user
, it’s id
, like so:
do_shortcode('[li_card id="' . $user_id . '"]');
do_shortcode('[li_profile id="' . $user_id . '"]');
Make sure $user_id
actually contains the id of the user you want to display the info from and make sure that user did connect his WP account to his LinkedIn account.
During development process I suggest you add define('LI_DEBUG', true);
to your wp-config.php
file.
You can also try to use author
instead of the user id and the plugin will use the current author id:
do_shortcode('[li_card id="author"]');
do_shortcode('[li_profile id="author"]');
You can see the plugin’s documentation here: https://vdvn.me/p1nd