1. Home
  2. Docs
  3. XYZ WP Insert Code Snippet Premium
  4. User Guide
  5. Custom Parameters

Custom Parameters

In this section we can setup the default values for custom parameters.

custom parameters

Here click on the “Add Custom Parameter” button and we can add a default value for the custom parameter.

So in the snippet short code we have not defined the value of the parameter, it will use the default value.

For example please consider the example below.

parameter passing 1

Here in the snippet content we can add the parameters in braces. The parameters are {param1} and {date}.

In the short code when using in the site content, we can add the parameter and value like in the format  [xyz-ics snippet=”snippet” param1=”val1″] as given image.

parameter passing 2

Here the used short code is [xyz-ics snippet=”Test-Snippet” param1=”XYZScripts” date=”03 Jan 2018″] where first parameter is “param1” and its value is “XYZScripts” and the second parameter is “date” and its value is “03 Jan 2018”.

If we want to use the default value of these parameters we can use the shortcode like  [xyz-ics snippet=”Test-Snippet”]. So in the parameter section it will use the default value.

Now in the post it will display the parameter values like the following image.

parameter passing 3

Was this article helpful to you? Yes 1 No