Shortcode to show content to non affiliates

[ad_1]

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 17 minutes ago by iova.mihai.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer