Title: Shortcodes with html()
Last modified: August 20, 2016

---

# Shortcodes with html()

 *  Resolved [gillespieza](https://wordpress.org/support/users/gillespieza/)
 * (@gillespieza)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-with-html/)
 * Is there a way to parse shortcodes with html()? Or is there another way I could
   make a shortcode render on an options page?
 * [http://wordpress.org/extend/plugins/scb-framework/](http://wordpress.org/extend/plugins/scb-framework/)

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-with-html/#post-3540477)
 * I have no idea what you’re asking or why you would need what you’re asking.
 * Please post a more thorough explanation of the use case, and maybe some example
   code in a [pastebin](http://pastebin.com) to go along with it.
 *  Thread Starter [gillespieza](https://wordpress.org/support/users/gillespieza/)
 * (@gillespieza)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/shortcodes-with-html/#post-3540627)
 * So, for example, if I had a [permalink] shortcode function defined elsewhere (
   perhaps in my actual plugin functions file), and in an options page I wanted 
   to output some html like:
 * `<p>Click on this [permalink id="123"]link[/permalink] for more information.</
   p>`
 * if I use
    `echo html( 'p', 'Click on this [permalink id="123"]link[/permalink]
   for more information.' );` then the shortcode doesn’t render, it just displays
   the text exactly as is
 * (I know `permalink` is a bad example because how would I know the ID to be linking
   to, but I couldn’t think of another example offhand)
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/shortcodes-with-html/#post-3540628)
 * This should work:
 *     ```
       $content = do_shortcode( 'Click on this [permalink id="123"]link[/permalink] for more information.' );
   
       echo html( 'p', $content );
       ```
   
 *  Thread Starter [gillespieza](https://wordpress.org/support/users/gillespieza/)
 * (@gillespieza)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/shortcodes-with-html/#post-3540629)
 * Fabulous, thanks!

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

The topic ‘Shortcodes with html()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/scb-framework.svg)
 * [scbFramework](https://wordpress.org/plugins/scb-framework/)
 * [Support Threads](https://wordpress.org/support/plugin/scb-framework/)
 * [Active Topics](https://wordpress.org/support/plugin/scb-framework/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/scb-framework/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/scb-framework/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [gillespieza](https://wordpress.org/support/users/gillespieza/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/shortcodes-with-html/#post-3540629)
 * Status: resolved