Support » Themes and Templates » shortcode question

  • 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

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

    (@alchymyth)

    Forum Moderator

    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.

    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

    (@alchymyth)

    Forum Moderator

    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.

    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.