• I am using TwentyFourteen. I have a shortcode for a css class I want to add to a link. My tech knowledge is limited. I don’t see the option in TineyMCE.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Dan14

    (@dan14)

    What I am trying to do is to have a link inserted to an image and when it is clicked the modal box would open. The class is a shortcode.

    Are you using a specific plugin? If so, which one?

    The way you define a class for a link is like this:

    <a href="http://example.com" class="link_class"><img src="myimage.jpg" /></a>

    Not sure how you would add the shortcode as a class; maybe substitute link_class above with the shortcode? I’ve never seen a shortcode inserted as a class.

    Thread Starter Dan14

    (@dan14)

    Bruin, may life saviour, how are you?? The plugin is premium so it is unavailable on the list. The owner didn’t reply for a while but he just started emailing me today! The is issue, which is still unsolved, is adding a modal box click event (the shortcode) when an image is clicked on. So the link is actually within the shortcode, which opens a modal box. I had some other critical issues with the plugin that are being solved at the moment. I don’t want to you spend a lot of time on this Bruin as he will get to it eventually, only if you know how can this be implemented.

    Ah, OK. Usually when a plugin takes a link as a parameter, it will look something like:

    [linkbox url="http://example.com"]

    or

    [linkbox link="http://example.com"]

    The exact parameter name depends on the plugin. I’m surprised that it wasn’t made clear in the plugin’s instructions. But anyway, yes, you’ll need to wait for the developer to get back to you.

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

The topic ‘Adding css class shortcode to links’ is closed to new replies.