Promotional Sale Ends Soon!

D
H
M
S

Favorite Content Shortcodes for LearnDash

Favorite Content

Favorite Content includes shortcodes for placing favoriting controls and saved-content displays where your site design needs them. The legacy category guide explicitly documents the [favorite_button] shortcode.

Add a favorite button

Use [favorite_button] to place the Favorite Content button within supported WordPress or LearnDash content. This shortcode is for the Favorite Content plugin, not a built-in LearnDash shortcode.

If you add it on a content type that isn’t enabled in the Favorite Content settings, the button won’t display.

In the WordPress block editor

  1. Open the post or page where you want to display the button.
  2. Insert a Shortcode block.
  3. Type the shortcode [favorite_button] into the block.
  4. Save the draft and preview the page while signed in as a learner.

In Elementor

  1. Open the intended page or template with Elementor.
  2. Insert Elementor’s Shortcode widget where the button should appear.
  3. Enter [favorite_button] into the shortcode field.
  4. Update the Elementor design and test the rendered page as a learner.

Display saved favorites

[favorite_content]

Favorite Content table listing a user's saved favorites with a search field and heart icons.

Outputs a table of all the favorites a user has saved throughout the site.

[favorite_course_content]

Favorite Content tables grouping saved favorites by course, with search fields.

Outputs a series of tables of favorites organized by course.

Troubleshoot a shortcode

  • If the shortcode prints as plain text, check that Favorite Content is active and that the shortcode was entered into a Shortcode widget or block.
  • If no button displays, make sure the current content type is eligible for favoriting under your plugin configuration.
  • Test while logged in as a learner, not only in Elementor’s editor.
  • If the interface appears incorrect on one template, test the same shortcode on a simple WordPress page to isolate the layout issue.
  • Avoid assuming that undocumented attributes are supported; test against the installed version.

Related Articles

Need Support?

Cannot find what you need? Our support team can help with installation, settings and licensing.