Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom shortcode in forum post

  • Hi,

    I created a custom shortcode for the site pages, posts.
    But it’s not working in forum post.

    How can i do?

    My custom shortcode code:

    function custom_shortcode_errorbox( $atts , $content ) {
    	// Attributes
    	$atts = shortcode_atts(
    		array(
    		),
    		$atts,
    		'error'
    	);	
    	$output = '<div class="errorbox"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> ' . $content . '</div>';
    	return $output;
    }
    add_shortcode( 'error', 'custom_shortcode_errorbox' );
  • You must be logged in to reply to this topic.
Skip to toolbar