Title: shortcode question
Last modified: August 19, 2016

---

# shortcode question

 *  [mxpimp47](https://wordpress.org/support/users/mxpimp47/)
 * (@mxpimp47)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/shortcode-question-1/)
 * i want to create a shortcode that will control a heading, and list within a div.
 * i have the shortcode created and i cant target the elements in the shortcode 
   at all. only the div and that is it.
 * maybe i have a misconception of what i can do with shortcodes….
 * could someone please lead me in the right direction for what im trying to achieve,
   it would be greatly appreciated!
 * [http://pastebin.com/vNtXTQLs](http://pastebin.com/vNtXTQLs)

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/shortcode-question-1/#post-2018765)
 * > i want to create a shortcode that will control a heading, and list within a
   > div.
 * you have the div;
 * what heading?
 * what list?
    what is the list supposed to list?
 * you can do a lot of stuff with shortcodes (see the gallery shortcode for instance),
   only make sure to `return` the result, and don’t use anything in the code that
   would `echo` something.
 *  Thread Starter [mxpimp47](https://wordpress.org/support/users/mxpimp47/)
 * (@mxpimp47)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/shortcode-question-1/#post-2018770)
 * i want to type the heading and list between the shortcode like this maybe –
 *     ```
       [services]
       <h4>heading</h4>
       <ul>
       <li>list item</li>
       <li>list item</li>
       </ul>
       [/services]
       ```
   
 * or do i have to specify the heading tag and list in the shortcode function?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/shortcode-question-1/#post-2018797)
 * only seems to work if you add your shortcode into the post editor in **html mode**;
   visual mode seems to mess with the html tags.
 *  Thread Starter [mxpimp47](https://wordpress.org/support/users/mxpimp47/)
 * (@mxpimp47)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/shortcode-question-1/#post-2018803)
 * i have setup this shortcode with the twentyten theme and it doesnt work in html
   mode.

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

The topic ‘shortcode question’ is closed to new replies.

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [mxpimp47](https://wordpress.org/support/users/mxpimp47/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/shortcode-question-1/#post-2018803)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
