• Resolved zenha2022

    (@zenha2022)


    Hello!

    We just purchased the license and we want to show some content to non affiliates on the homepage, like a banner asking for people to be our affiliates.

    Also, we want to show other content to affiliates, which is not visible to non affiliates.

    Is there any shortcode or PHP code to verify if a user is affiliate?

    Best regards and thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    Hey @zenha2022,

    Thank you for reaching out! I’m afraid that we currently do not have a shortcode for this particular scenario. However, we do have a PHP function that could be helpful.

    Here’s a code snippet that you can use:

    if ( function_exists( 'slicewp_get_current_affiliate_id' ) {
    
    	if ( empty( slicewp_get_current_affiliate_id() ) ) {
    
    		// Add content for non-affiliate users.
    
    	} else {
    
    		// Add content for affiliate users.
    
    	}
    
    }

    Please make sure to adapt the code to your specific needs.

    Thank you and best wishes,

    Mihai

    • This reply was modified 10 months ago by iova.mihai.
    Thread Starter zenha2022

    (@zenha2022)

    Hi!

    That is exactly what I was looking for!

    Thanks for the help.

    Best regards

    Plugin Author iova.mihai

    (@iovamihai)

    Hey @zenha2022,

    Awesome! Happy I could help you out.

    Wishing you all the best!

    Mihai

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode to show content to non affiliates’ is closed to new replies.