Title: Shortcode Confusion
Last modified: August 20, 2016

---

# Shortcode Confusion

 *  Resolved [3Plumes](https://wordpress.org/support/users/3plumes/)
 * (@3plumes)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/shortcode-confusion/)
 * This may not be the best solution, so if you can think of another way to do this,
   I would love to know.
 * I’m trying to make it easy to enter a definition list via the visual editor (
   and not in html view) for basic users in a site. The output should be something
   similar to this:
 *     ```
       <dl class="service">
       <dt>Name of Service</dt>
       <dd class="price">Price</dd>
       <dd class="desc">Description of Service</dd>
       </dl>
       ```
   
 * I’ve been trying to create shortcodes to handle this, but I haven’t been successful.
   This is what I’ve tried:
 *     ```
       /* ====== Shortcode: Service Item */
       function register_shortcode_item($atts, $content = null) {
              return '<dt>' . $content . '</dt>';
           }
           add_shortcode("item", "register_shortcode_item");       
   
       /* ====== Shortcode: Service Price */
       function register_shortcode_price($atts, $content = null) {
              return '<dd class="price">' . $content . '</dd>';
           }
           add_shortcode("price", "register_shortcode_price");       
   
       /* ====== Shortcode: Service Description */
       function register_shortcode_description($atts, $content = null) {
              return '<dd class="description">' . $content . '</dd>';
           }
           add_shortcode("description", "register_shortcode_description");
       ```
   
 * For some reason, everything seems to work fine, except it’s not parsing all the
   shortcodes (price). I enter:
 * **[service][item]Mini Manicure[/item][price]$25[/price][description]description
   goes here[/description][/service]**
 * Can anyone point me in the right direction?
 * Thanks

Viewing 1 replies (of 1 total)

 *  Thread Starter [3Plumes](https://wordpress.org/support/users/3plumes/)
 * (@3plumes)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/shortcode-confusion/#post-2250888)
 * Okay, I figured it out. I placed spaces in between the shortcodes (closing and
   opening), and it started working.

Viewing 1 replies (of 1 total)

The topic ‘Shortcode Confusion’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [3Plumes](https://wordpress.org/support/users/3plumes/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/shortcode-confusion/#post-2250888)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
