• I would like to have the following ability on a WordPress page:

    We have a homepage designed in WordPress, say https://www.examplesite.com.

    I want this page to be seen only when clicked from a link, say, https://www.examplesite.com/?code=REF_35DHC4XQ&fbclid=IwAR3X5692MvS4A_wWRIz-qfEOzkvjjnJtSuGnAjaXY-rkF7iER9nTHbm9Bk0

    Otherwise, the homepage should show the text “Sorry, this page is invitation only”

    The link could be different for different people.

    I mean code=REF_35DHC4XQ&fbclid=IwAR3X5692MvS4A_wWRIz-qfEOzkvjjnJtSuGnAjaXY-rkF7iER9nTHbm9xx0 can be different as different people can be invited using different links.

    So I would like to have the ability to create these links and see that home page only based on the random link.

    I have searched on google about this but I could find plugins only to display the content based on a single link that can be set by the admin. But I want this link to be different for each user and should display the same homepage content for each user.

    Is this possible to be set up in WordPress? If so, please help me to achieve this.

    • This topic was modified 4 years, 10 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • It doesn’t make much sense the way you describe it. Also, why the home page? It could be any page.
    And is the code related to a user in the database? I just came across this plugin that might serve if it is user-related: https://www.ads-software.com/plugins/peters-login-redirect/
    Otherwise, you could have a simple function filtering the_content that checks for the existence of your URL parameter. If it is not found, it sets the content to your “Sorry” message.

    Moderator bcworkz

    (@bcworkz)

    Instead of passing some sort of code in URLs, wouldn’t it make more sense to simply let users register so they can log in and see tailored content based on the logged in user? This would be more aligned with how WP works by default. Just about anything is possible, but the farther you deviate from how WP works the more effort required to implement it.

    By using a register/log in scheme, one of the many membership plugins available should be able to help you deliver tailored content with little fuss.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to generate random link for homepage for each user in wordpress’ is closed to new replies.