Title: link redirection Page code
Last modified: August 31, 2016

---

# link redirection Page code

 *  [deuns26](https://wordpress.org/support/users/deuns26/)
 * (@deuns26)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/link-redirection-page-code/)
 * following the topic : [https://wordpress.org/support/topic/link-redirection-4](https://wordpress.org/support/topic/link-redirection-4)
 * I find a code that works but is it possible to have a shortcut, I have a lot 
   of line with 400 member.
    it is necessary that ‘echo’, reference link after connection.
 *     ```
       <?php
       $member_id = SwpmMemberUtils::get_logged_in_members_id();
       if ($member_id == "1"){
           echo "To find your private page, voici le lien : <a href=\"http://pagemembre1.com/\">Ma Page Privé</a>";
       }
   
       if ($member_id == "2"){
           echo "To find your private page, voici le lien  : <a href=\"http://Lien2.com/\">Ma Page Privé</a>";
       }
   
       if ($member_id == "3"){
           echo "To find your private page, voici le lien  : <a href=\"http://Lien3.com/\">Ma Page Privé</a>";
       }
       if ($member_id == "400"){
           echo "Pour retrouver ma page privé, voici le lien 5 : <a href=\"http://Lien400.com/\">Ma Page Privé</a>";
       }
       ?>
       ```
   
 * thx for new
 * [https://wordpress.org/plugins/simple-membership/](https://wordpress.org/plugins/simple-membership/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [wp.insider](https://wordpress.org/support/users/wpinsider-1/)
 * (@wpinsider-1)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/link-redirection-page-code/#post-7053637)
 * This is your custom code so you should create a function with this code. You 
   can even create a shortcode with this code. Then you will be able to use that
   function or shortcode where you want.

Viewing 1 replies (of 1 total)

The topic ‘link redirection Page code’ is closed to new replies.

 * ![](https://ps.w.org/simple-membership/assets/icon-128x128.png?rev=974529)
 * [Simple Membership](https://wordpress.org/plugins/simple-membership/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-membership/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-membership/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-membership/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-membership/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-membership/reviews/)

## Tags

 * [link](https://wordpress.org/support/topic-tag/link/)

 * 1 reply
 * 2 participants
 * Last reply from: [wp.insider](https://wordpress.org/support/users/wpinsider-1/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/link-redirection-page-code/#post-7053637)
 * Status: not resolved