Shortcodes

Shortcodes will allow you to create any of the following pages using just a single piece of code. Check out the list:

Crowdfunding project listing shortcode

[wpcf_listing]

You can display all of your campaign listings in any project using this shortcode.

Crowdfunding project listing shortcode with specific category

[wpcf_listing cat="category_name"]

You can show all the campaign listing of a particular category on any page using this shortcode. If you want to show all campaigns, then use “-1” on the “category_name” parameter.

Crowdfunding project submission form

[wpcf_form]

It allows you to display a form by which users can create a new campaign from the frontend.

Crowdfunding project search shortcode

[wpcf_search]

It will allow you to create a search bar. You can search for all the campaigns by using that search bar.

Crowdfunding user dashboard shortcode

[wpcf_dashboard]

Applying this shortcode will display the dashboard on any page.

Crowdfunding user registration shortcode

[wpcf_registration]

You can display a user registration form on any page using this shortcode.

Single Campaign Page

[wpcf_single_campaign campaign_id="crowdfunding_product_id"]

If you want to show any particular campaign to a specific page, you can use this shortcode to do so. Just remember one thing, the ID you see here is the id of your specific campaign.

How to access Crowdfunding Product ID:

  1. Navigate to the WP Dashboard > Products > All Products page.
  2. Select Crowdfunding from the dropdown of Filter by product type option and click on the Filter button.
  3. Hover on your preferred product and copy the product ID.
Get Crowdfunding product ID

Single Campaign Box

[wpcf_campaign_box campaign_id="crowdfunding_product_id"]

If you want to show any particular campaign inside a box, you can use this shortcode to do so. Just remember one thing: the ID you see here is your specific campaign’s ID.

[wpcf_popular_campaigns limit="4" column="4" order="DESC" class=""]

It helps you to display popular campaigns. The popular product widget of WooCommerce inspired this one. The number of sales decides the popularity.

Campaign Box

[wpcf_donate campaign_id="124" amount="9000" min_amount="5" max_amount="1000" show_input_box="true" donate_button_text="Donate"]

This shortcode helps you to display a single campaign. You have to use the campaign ID with this shortcode.

The supported parameters for this shortcode are –

  • limit – numeric value. You can set the number of campaigns you want to show using this parameter.
  • column – numeric value. You can set the number of columns you want to arrange the campaigns. The recommended value is 1 to 4.
  • order – DESC or ASC. This one defines the ordering based on the title in ascending or descending order.
  • class – text value. If you want to add a CSS class to the section, you can add that here.

As you already know that the WP Crowdfunding campaigns are WooCommerce products. You can get the product ID by hovering on the product title.

Note: All the shortcodes for WP Crowdfunding has now converted to Gutenberg blocks for faster deployment. You can learn more from this documentation.

Was this helpful?