• ResolvedPlugin Contributor Chris Dillon

    (@cdillon27)


    Shortcodes come in three flavors:

    • self-closing: [strong]
    • enclosing: [strong][/strong]
    • self-enclosing: [strong ... /]

    When using multiple [strong]‘s on a page and any of them wraps content or has child shortcodes, each one must be enclosed with [/strong]. This seems to work better than the self-enclosing [strong ... /].

    If there is only one [strong] on the page, it would not require the extra closing [/strong].

    When in doubt, go with enclosed. See Enclosing Shortcodes to learn more.

    For example, this will not work because the first shortcode is not enclosed:

    [strong form]
    ...
    [strong per_page="3]
      [client]
        [field name="client_name" class="name"]
      [/client]
    [/strong]

    But this will:

    [strong form][/strong]
    ...
    [strong per_page="3]
      [client]
        [field name="client_name" class="name"]
      [/client]
    [/strong]

    When counting [strong]‘s, consider the entire page, not only the main content field. Include any that are embedded in page builder components, text widgets, or template files.

    https://www.ads-software.com/plugins/strong-testimonials/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Chris Dillon

    (@cdillon27)

    With Views and the [testimonial_view] shortcode, this is no longer a problem.

    The [strong] shortcode will be removed in version 2.

Viewing 1 replies (of 1 total)
  • The topic ‘Enclosing the shortcode fixes many problems’ is closed to new replies.