Right now author's profile link is being outputted as a text on the frontend, but I want it to be outputted as hyperlink. So only text is being outputted: example.com/author/username. I need to turn this into hyperlink - to display a username associated with a user_link and to be clickable(to actually take you associated example.com/author/username.
I'm outputting this author profile information through shortcode on the frontend.
In my shortcode.php file it's defined like this at moment(Author's profile link is being pulled from a saved order.):
$output .= '<td>' . $order->user_link . '</td>';
user_link
is outputting just a text format: example.com/author/username on the frontend. I need a hyperlink and I don't know how to create a hyperlink for this.
The function you need to use is get_the_author_link
$output .= "<td> <a href='" . $order->user_link . " '>user</a></td>";
can't you change your shortcode.php into this. correct me if i am wrong .I am not sure about it.