skip to Main Content

I have added some code to my website to show the user’s website link (please see below) but the website link is not clickable so

  1. I want to make the user website link clickable and highlighted.
  2. I would like that if the user inputs https://mywebsite.com or https://www.mywebiste.com in that field it only show the website name like this mywebsite.com

Could you help me to achieve it?

        'field' => 'web', // Field name or ID.
    );
echo <a href="<?php echo $my_bio_excerpt; ?>" class="">click here</a>

Thank you.

2

Answers


  1. I would suggest to add an <a href></a> to make it a link – see https://www.w3schools.com/tags/att_a_href.asp

    Login or Signup to reply.
  2. Your PHP syntax is wrong in:

    echo <a href="<?php echo $my_bio_excerpt; ?>" class="">click here</a>
    

    Should be:

    echo "<a href="$my_bio_excerpt" class="">click here</a>";
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search