Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • Fábio Roque
    Participant

    @fabioroque92

    when I developed this, I had problems with css styles, js files… maybe is something like that, I don’t know, I never used the H5P.

    I used this code to insert my own shortcodes!

    I would like to help you, but without testing is difficult. Try search in H5P documentation!


    Fábio Roque
    Participant

    @fabioroque92

    Hi @futureyoon

    Try this

    /**
     * Render shortcodes on feed posts
     */
    function enable_shortcode_bp_activity($content) {
        $content = stripslashes($content);
    	return do_shortcode($content);
    }
    
    add_filter('bp_get_activity_content_body', 'enable_shortcode_bp_activity', 0);

    ps: this was not tested in buddyboss 2.0


    Fábio Roque
    Participant

    @fabioroque92

    Hi, I already found a solution.

    /**
     * Enable shortcode rendering in BuddyPress activity.
     */
    add_filter( 'bp_get_activity_content_body', function ( $content ) {
    
    	echo do_shortcode( $content );
    
    }, 0 );

    Fábio Roque
    Participant

    @fabioroque92

    if I go to the entry template and put <?php echo do_shortcode([shortcode)] ?> it Works, but if I insert a shortcode directly in the feed doesn’t work


    Fábio Roque
    Participant

    @fabioroque92

    I already have the shortcode created, but when I put the shortcode in activity feed he doesn’t work.

    I want to do this: https://buddypress.org/support/topic/enable-shortcodes-in-activity-screen-of-buddypress/ but in the new version of buddypress.


    Fábio Roque
    Participant

    @fabioroque92

    Sorry mate but I can’t solved this problem.

    `
    function enable_shortcodes_in_feed()
    {

    add_filter( ‘ ??? ‘, ‘do_shortcode’, 1);

    }
    add_action( ‘bp_activity_entry_content’, enable_shortcodes_in_feed’ ); `

    And I tried add the do_shortcode in the template but doesn’t works too


    Fábio Roque
    Participant

    @fabioroque92

    I think I wasn’t clear in what I’m looking for.

    I want to include a contactform7 shortcode in a activity feed


    Fábio Roque
    Participant

    @fabioroque92

    I don’t have another option to enable the shortcodes in activity posts ?

    I found this:

    Enable Shortcodes in Activity Screen of Buddypress

    but doesn’t work

Viewing 8 replies - 1 through 8 (of 8 total)
Skip to toolbar