Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Fábio Roque

    (@fabioroque92)

    Solution:

    /**
     * Render shortcodes on feed posts
     */
    function enable_shortcode_bp_activity($content) {
        $content = stripslashes($content);
    	echo do_shortcode($content);
    }
    
    add_filter('bp_get_activity_content_body', 'enable_shortcode_bp_activity', 0);
    Thread Starter Fábio Roque

    (@fabioroque92)

    Hi really thank you for your help, I already understand why doesn’t work to me, because me shortcode is [contact-form-7 id=”xx”] if I use a shortcode without “” it Works, do you know how to fix this “” problem ? thnks

    Thread Starter Fábio Roque

    (@fabioroque92)

    Hi BuddyDev, thnks for you help I’m trying solve this problem. I had already tried with something similar but doesn’t work, with your code doesn’t work too. look if you try this:

    add_filter( 'bp_get_activity_content_body', function ( $content ) { 
                  error_log( $content );
    }, 0 ); 

    And try include one shortcode in one post and try include ‘ [just_test] ‘ in another post… You will see the log file return empty in first post and return “[just_test]” in second post.

    Maybe have some filter to remove shortcode before the our filter. Sorry for my english but did you understand what i said? thnks again mate

    • This reply was modified 3 years, 3 months ago by Fábio Roque.
Viewing 3 replies - 1 through 3 (of 3 total)