Support

Account

Home Forums General Issues Adding one (or more) classes to an ACF Link field

Helping

Adding one (or more) classes to an ACF Link field

  • Hi there,

    Using the Link field it returns a link array which I use to construct custom links on the page.

    However, some of the links i’d like to have a class attached so I can use them to open modals with JS.

    Is there a way to let the user add a class when adding/changing a link?

    Best regards,
    Dave

  • Hi there,

    Thanks for getting in touch!

    I would suggest that you create an additional text field on the same field group and use this to add the class name that can be used on the page template when displaying the link field.

    I hope this info helps.

    Thank you.

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

The topic ‘Adding one (or more) classes to an ACF Link field’ is closed to new replies.