Title: Adding css class shortcode to links
Last modified: August 22, 2016

---

# Adding css class shortcode to links

 *  [Dan14](https://wordpress.org/support/users/dan14/)
 * (@dan14)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-css-class-shortcode-to-links/)
 * 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](https://wordpress.org/support/users/dan14/)
 * (@dan14)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-css-class-shortcode-to-links/#post-5610808)
 * 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.
 *  [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * (@crouchingbruin)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-css-class-shortcode-to-links/#post-5610928)
 * 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](https://wordpress.org/support/users/dan14/)
 * (@dan14)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-css-class-shortcode-to-links/#post-5610929)
 * 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.
 *  [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * (@crouchingbruin)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-css-class-shortcode-to-links/#post-5610948)
 * 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.

## Tags

 * [css-class](https://wordpress.org/support/topic-tag/css-class/)
 * [links](https://wordpress.org/support/topic-tag/links/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 4 replies
 * 2 participants
 * Last reply from: [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/adding-css-class-shortcode-to-links/#post-5610948)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
