The [elc_ssc_front_search] shortcode is the cornerstone of all front-end certificate verification. It is responsible for generating the user-facing search form and acts as the essential container for displaying the verification results. Understanding its dual implementation patterns is key to leveraging the plugin’s full potential.
Implementation Patterns #
Implement this shortcode in two distinct ways, each serving a different developer goal.
Self-Closing for Preformatted Output #
For standard use cases where speed is prioritized over custom design, use the self-closing or “fire-and-forget” method: [elc_ssc_front_search]. This automatically generates a standard search form with a text field and a submit button.
In this mode, use the optional display_as parameter to control the layout of the verification results without needing to write any custom HTML.
| Parameter Value | Description | Example Usage |
|---|---|---|
table (default) | Renders the verification information in a preformatted HTML table. | [elc_ssc_front_search display_as="table"] |
list | Renders the verification information as an HTML list. | [elc_ssc_front_search display_as="list"] |
div | Renders the verification information within a div container. | [elc_ssc_front_search display_as="div"] |
Container for Custom Layouts #
For bespoke layouts that match a site’s specific branding and data requirements, use the shortcode with opening and closing tags: [elc_ssc_front_search]...[/elc_ssc_front_search]. This pattern transforms the shortcode into a developer’s toolkit.
This method also generates the standard search form. However, its primary purpose is to act as a container. Nest other plugin-specific shortcodes (like [elc_ssc_show]) between the opening and closing tags to build a fully custom layout for the verification data.
Global Parameters #
The [elc_ssc_front_search] shortcode accepts parameters that globally affect the data displayed within it.
Customizing Date Formats with datetime_format
Control the date display format with the optional datetime_format parameter. By default, the plugin formats all dates using the “Y-m-d” format (e.g., 2023-01-24).
To override this, provide a new format string. For example, datetime_format="F j, Y" will render dates in a more readable format, such as “January 24, 2023”. This setting applies to all date fields rendered by shortcodes nested inside the container.
With the core container established, we can now explore the shortcode used to display individual fields from the verified certificate.