skip to Main Content

I want the user to click arrow and it will redirect to myproject page in wordpress. Please let me know how to give a link to a page in wp.

<i class="bi-arrow-right"></i>

The code is mentioned below.

<a class="circle-link" href="<?php echo $project07['project_link']; ?>">
    <span class="circle-icon">
       <i class="bi-arrow-right"></i>
    </span>
    <span>View Project</span>
</a>

2

Answers


  1. <script>
    $(document).ready(function(){
    var yourUrl = "https://yoururl.com";
    $(".circle-link").attr('href',yourUrl);
    })
    </script>
    

    Add this in at the end of the page WordPress page. I hope this helps and this is what you are looking for.

    Login or Signup to reply.
  2. Because probably $project07['project_link'] is an array.
    var_dump() this value and see what is the structure of that array.
    If you are using the ACF for wordpress, you should be able to access the link after writing <?= $project07['project_link']['url']; ?>

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search