Aug 14, 2023 9:52 am
I have found a way to do it.
The function to edit is in the wpforo/classes/Actions.php file.
Search for : public function post_add()
and replace the whole function with this :
public function post_add() { wpforo_verify_form(); $args = $_REQUEST['post']; $args['postmetas'] = (array) wpfval( $_REQUEST, 'data' ); $from = wpforo_get_request_uri(); $isForumPage = strpos( $from, '/community/' ) !== false; if( $postid = WPF()->post->add( $args ) ) { if ( $isForumPage ) { wp_safe_redirect( WPF()->post->get_url( $postid ) ); } else { wp_safe_redirect( $from ); } exit(); } wp_safe_redirect( $from ); exit(); }
Replace /community/ with your board slug if you have changed it
Hopefully somebody with a better knowledge of the WPForo code can modify this so that it will work regardless of what your board is called or how many boards you have, but if you have a vanilla installation, this will do the trick.
Page 2 / 2
Prev