Skip to:
Content
Pages
Categories
Search
Top
Bottom

change redirect link after submit

  • @carasse64

    Participant

    Hello

    I am running a site with buddypress and Bbpress.

    I have activated the bbp style pack. I have noticed the feature that allows to redirect to the index of the forum after submit new topic or reply. Would you have a solution to rather redirect to my buddypress newsfeed page (mysite.fr/newsfeed) ?

    Thanks.

    Fabien

Viewing 3 replies - 1 through 3 (of 3 total)
  • @robin-w

    Moderator

    I have noticed the feature that allows to redirect to the index of the forum after submit new topic or reply.

    to save me looking through, where is this setting exactly

    ie

    dashboard>settings>bbp style pack> then where?

    @carasse64

    Participant

    @robin-w

    Moderator

    untested, but this should do it

    add_filter( 'bbp_new_topic_redirect_to', 'rew_forum_redirect_topic' , 10 ,3 ) ;
    add_filter( 'bbp_new_reply_redirect_to', 'rew_forum_redirect_reply' , 10 ,3 ) ;
    
    function rew_forum_redirect_topic ($redirect_url, $redirect_to, $topic_id ){
    	$redirect_url = 'http://mysite.fr/newsfeed' ;
    return $redirect_url ;
    
    }
    
    function rew_forum_redirect_reply ($redirect_url, $redirect_to, $reply_id ){
    	$redirect_url = 'http://mysite.fr/newsfeed';
    return $redirect_url ;
    
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar