Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to pass extra variables in URL with Wordpress

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 361
    Comment on it

    Hello reader's, today we will discuss about "How to pass extra variable in URL in Wordpress".

    Suppose , Admin want to update the user detail then they go to user listing page and select the user and click edit button or link. When clicking edit link, we can bind user_id to URL and jump to other page. Below is the example of how to send extra parameter through URL in Wordpress

    <a href="<?php echo get_the_permalink(get_page_by_title('Contact')->ID);?>?uid=5">Edit</a>
    

    On the basis of user_id we can fetch all the record of the user. Below is the example how to get extra variable value.

     User Id = <?php echo $_GET['uid']; ?>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: