WordPress.org

Ready to get started?Download WordPress

Forums

OpenHook
[resolved] Using Shortcodes inside Openhook (2 posts)

  1. jameszol
    Member
    Posted 3 years ago #

    How can I execute shortcodes inside Openhook?

    I tried the do_shortcode php surrounding it and couldn't get it to work, there are a few "add filter" things I could try, but I wasn't sure what the text in Openhook is called so I can add a filter to that text with "do_shortcode"...

    Thoughts? Recommendations?

    This is where I rec'd a few ideas that didn't seem to work for me... http://sillybean.net/2010/02/using-shortcodes-everywhere/

    http://wordpress.org/extend/plugins/thesis-openhook/

  2. Spencer Tomosvary
    Member
    Posted 2 years ago #

    You can do it like this:

    <?php
    $myfunction= '[PutYourShortCodeHere]';
    $myfunction_parsed = do_shortcode($myfunction);
    echo $myfunction_parsed;?>

    Make sure to check the box that says 'execute PHP on this hook'.

    Credit:
    http://goodkarmahost.com/topics/tech-help/wordpress/thesis-wordpress-theme-adding-shortcodes-to-the-multimedia-box/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic