Skip to content

Shortcodes

The plugin ships two shortcodes: one renders the signup form, the other renders the affiliate dashboard. This tab is where you rename them and set what the signup page shows.

Go to DevDiggers Plugins → Affiliates → Configuration → Shortcodes.

The Affiliates Shortcodes settings tab with both shortcode fields and the registration content option

Affiliate Registration Form Shortcode defaults to [ddwcaf_affiliate_registration_form_shortcode]. Put it on any page to render the signup form.

The Affiliate Registration Form Shortcode field on the Shortcodes settings tab

Affiliate Dashboard Shortcode defaults to [ddwcaf_affiliate_dashboard_shortcode]. Activation already put this one on the Affiliate Dashboard page it created.

The Affiliate Dashboard Shortcode field on the Shortcodes settings tab

Both fields let you rename the shortcode. Only do that if the default name clashes with another plugin. Renaming a shortcode does not update pages already using the old one, so you have to edit every page that uses it.

Registration Page Content decides what the registration shortcode renders for a logged-out visitor.

The Registration Page Content dropdown on the Shortcodes settings tab

  • Display Login + Registration Form shows both side by side. This is the default and the right choice for a dedicated affiliate landing page, since returning affiliates need somewhere to log in.
  • Display Registration Form Only shows the signup form alone. Use it when you already have a login link elsewhere on the page.

The setting only affects logged-out visitors. A logged-in customer who is not yet an affiliate always sees the short join form asking for the extra affiliate fields, whichever option is set.

The Become an Affiliate form shown to a logged-in customer who is not yet an affiliate

A public ranking of your top earning affiliates. Competition is one of the cheapest ways to lift affiliate activity, and the same board doubles as social proof on a recruitment page.

The Affiliate Leaderboard section of the Shortcodes settings tab

Enable Leaderboard allows the shortcode to render. It is off by default, and while it is off the shortcode outputs nothing at all. That lets you place the board on a page and reveal it when you are ready.

Leaderboard Shortcode defaults to [ddwcaf_affiliate_leaderboard_shortcode]. It takes three attributes:

  • limit overrides how many affiliates this placement lists.
  • days limits the board to commissions earned in the last N days.
  • title prints a heading above the board.
[ddwcaf_affiliate_leaderboard_shortcode limit="5" days="30" title="Top performers this month"]

Affiliates Shown is the default list length, 10 out of the box, and accepts 1 to 100. The limit attribute overrides it per placement.

Privacy masks affiliate names, showing each viewer only their own in full. It is on by default and should stay on for a public board. Affiliates still see their own rank and earnings, and nobody else’s identity or income is exposed.

The Privacy checkbox highlighted

The board is built from commissions that are not cancelled, ordered by total commission, and it only counts affiliates who have earned something. A store with no commissions yet renders a short line saying the first sale takes the top spot.

The registration shortcode renders one of three things, depending on who is looking.

Visitor What they see
Logged out Login form, signup form, or both
Logged in, not an affiliate The join form with the affiliate fields only
Logged in, already an affiliate Nothing to sign up for

The leaderboard shortcode renders the same board for everyone, with names masked unless Privacy is off or the viewer is looking at their own row.

The dashboard shortcode renders the full affiliate dashboard for an approved affiliate, and the signup form for anyone who is not one yet. That is why one page can serve as both the signup page and the dashboard.