Support » Plugin: Shortcodes Pro » [Plugin: Shortcodes Pro] attributes_slug not working

  • Resolved DickRaney


    Attribute slugs are not being populated with their values as specified in the shortcode settings. The content portion works, but the attribute_slug tag does not get replaced by a value.

    Here is what I specified for my text attribute options

    This is what I am using for the HTML code
    <div class="%%attribute_slug%%">%%content%%</div>

    But all I get in the generated page is
    <div class="%%attribute_slug%%">sample text for column here.</div>

Viewing 6 replies - 1 through 6 (of 6 total)
  • Avoid text separations of any kind (e.g. comma, slash, underscore) in attribute names and it will work just fine.

    I don’t have any separations in the attribute names and it still isn’t working.

    Here is what I have for my attribute settings:
    Slug: type
    Label: Type
    Type: Select
    Options: Third|third,Last|last
    Default Value: third
    Description: Makes columns

    Pretty simple, but it just puts the attribute tag into the page.

    Thanks for your help!!!!

    Plugin Author Matt


    Hi Dick,

    The %%atribute_slug%% refers to the slug you enter when adding an attribute, in your case the attribute_slug of Type is “type”.

    So instead of:

    <div class="%%attribute_slug%%">%%content%%</div>

    You should use:

    <div class="%%type%%">%%content%%</div>

    THANKS!! That did the trick.

    Maybe I would have figured that out if I was using more than one attribute, since there would be no other way to differentiate which attribute I wanted.

    Anyway, I appreciate your help and think it is a great plugin.

    FYI, I went back and tested it using dashes as separators in the attribute values and it works just fine.

    Plugin Author Matt


    Excellent, glad to hear that 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Shortcodes Pro] attributes_slug not working’ is closed to new replies.