Blocks is a new free add-on for AffiliateWP that adds (yep, you guessed it) blocks. It provides an improved experience over shortcodes when using the WordPress block editor.
Shortcodes are neat (and aren’t going anywhere) but blocks can provide a visual representation for specific elements when working with AffiliateWP. As an example, instead of seeing the Affiliate Registration shortcode, you’ll see the entire form right within the block editor. Based on AffiliateWP’s settings, it will show or hide specific fields.
In total there are ten blocks, one for each of the shortcodes AffiliateWP currently provides.
Showing an affiliate their referral URL
Have you ever used the Affiliate Referral URL shortcode to display a referral URL to the logged in affiliate?
By using the Affiliate Referral URL block, you’ll now see how the referral URL will appear to affiliates when they view the page. You’ll no longer need to remember all the different shortcode parameters like pretty, format and url.
Just insert the block and configure the block’s options from the sidebar. As you update each option, the preview will instantly update within the editor.
If the user editing the page also happens to be an affiliate, they’ll see their real affiliate ID or username.
Adding the conversion script
If you’re not using an integration we support, you may be familiar with placing the conversion script shortcode on your website’s “success” page.
The shortcode has a whopping seven options to configure. Though there’s no block preview (it’s just a script after all), a block makes it simple to completely configure the shortcode without making any errors:
Restricting content to affiliates (or non affiliates)
Any block added inside the Affiliate Content block will only be visible to logged in (and active) affiliates. There’s also a block for doing the opposite, only showing content to non affiliates.
When any block within the Affiliate Content block is focused, it will show a notice, reminding you who the block’s intended audience is.
Give it a spin!
We’re excited at the possibilities blocks allow and we can’t wait to hear any and all feedback from you. There’s certainly a lot more we can do to further improve the experience.
Join 19,000+ others growing their business with AffiliateWP
We'll only notify you of new articles, special promotions and updates. No spam!