Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbp_shortcodes

  • I am trying to figure out how to allow custom shortcodes in topic posts. So far i’ve been trying to use bbp_shortcodes like this.

    function bbp_custom_shortcode($codes) {

    $codes[] = array(‘item’ => ‘item_func’);

    return $codes;

    }

    add_filter( ‘bbp_shortcodes’, ‘bbp_custom_shortcode’);

    The codes array is appended but it does nothing Can you explain how to do it properly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • this works:

    add_action( ‘bbp_get_reply_content’, ‘do_shortcode’);

    but it does allow every shortcode.


    travis.hill
    Participant

    @travishill

    I’ve done the same thing to my installation, however, you may want to use a check to check a users role so only certain roles can post shortcode.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar