• Resolved gpalowitch

    (@gpalowitch)


    Hi Elliot,

    What I would like to do is display some content if the first letter of a field is a certain one.

    If (first letter(post title)) = “A” then dosomething

    I found that CCS has a short code for only displaying a certain length of characters, but I would really love to pass the result of the shortcode into the if shortcode to come it.

    I would be very interested if there was a way to do this without having to create a custom field that just has the first letter of the post title in it.

    Thanks,
    Garrett

    https://ww.wp.xz.cn/plugins/custom-content-shortcode/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    With the latest update, you can set start=”true” for the [if] shortcode, and it will only check the beginning of post name or field value.

    [if name="a" start="true"]
      This displays if the post slug starts with "a"
    [/if]
    Thread Starter gpalowitch

    (@gpalowitch)

    Thanks Eliot,

    I really appreciate the quick response and addition.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Comparing shortcodes within an if shortcode’ is closed to new replies.