Site logo
Article

Shortcode example [myshortcode_listing id=”xx″]

You want to display this shortcode inside your listings and make it unique for each listings. These are the steps you need to take:

  1. Fields > create a Text field > this will show in the add listing form and you will use it to add the id of the shortcode for each listing
  2. Single page > content & tabs > profile > add the shortcode block > add this code inside it [myshortcode_listing id="[[shortcode-id]]"]
    [[shortcode-id]] will be different for you so delete it > press @ > select the field you created on step one.
  3. Now when you add/edit a listing you just add the id of the shortcode for that listing e.g. 36

 

 

Another example:

Let’s say you have installed a plugin that allows showing a facebook page feed, and it also provides a handy shortcode to use it anywhere.

Your objective is to create an easy way to allow users to show their facebook page feed in their listings, but you don't want to make them use shortcodes since that would be complicated especially for users who are less familiar with the concept.

Well, shortcode block makes everything easier for these cases. You will be able to create a field in the "Fields" tab of the listing type which the user would use to input their facebook page ID, and then use that ID in the shortcode block, to generate the feed automatically.

Important: The video below is an example, the plugin or plugin shortcodes may change or have changed but the method of integration will be the same regardless

Facebook feed tutorial

This method can be used for a variety of other purposes too and is not limited to social feeds. You can embed booking calendars, videos, weather widgets and more as long as the plugin or service you use provides an easy to use shortcode or embed code.

 

Docs