patrryk22 0 Report post Posted May 12, 2011 hi id like to redirect users whou logout from bbpress to maian site how to do it? Share this post Link to post Share on other sites
patrryk22 0 Report post Posted May 12, 2011 does anyone knows? Share this post Link to post Share on other sites
Simon 248 Report post Posted May 12, 2011 `add_action( 'bb_user_logout', 'my_redirect' );` `function my_redirect() {` `wp_redirect( home_url() );` `}` Untested. Share this post Link to post Share on other sites
patrryk22 0 Report post Posted May 12, 2011 in what fiell shoud i add it ? Share this post Link to post Share on other sites
patrryk22 0 Report post Posted May 12, 2011 guys wher to add this code? Share this post Link to post Share on other sites
timlinson 3 Report post Posted May 13, 2011 hooks go in the platformbase/functions.php file Share this post Link to post Share on other sites
patrryk22 0 Report post Posted May 13, 2011 well it doesnt work Share this post Link to post Share on other sites
Simon 248 Report post Posted May 13, 2011 You will have to put it somewhere in your forums theme files. Share this post Link to post Share on other sites
patrryk22 0 Report post Posted May 13, 2011 Simon buty where to put it ? there is lots of files? Share this post Link to post Share on other sites
Simon 248 Report post Posted May 13, 2011 functions.php in the forum theme folder. Share this post Link to post Share on other sites
patrryk22 0 Report post Posted May 13, 2011 hmm it doesnt work Share this post Link to post Share on other sites
catrina 103 Report post Posted May 13, 2011 Are you adding the code to the very bottom of the functions.php file (where it should be placed)? Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
patrryk22 0 Report post Posted May 13, 2011 even i put cod in very bottom here is code <?php define('FTHEMENAME', 'Platform Forum'); define('ADDONTO', 'PlatformPro'); define('ADDONTOVERSION', '1.0.0'); define('VPRO', true); define('FTDOMAIN', 'PlatformForum'); // DEFINE DIRECTORY CONSTANTS define('FPATH', bb_get_theme_directory()); define('FINC', FPATH . 'includes/'); define('FADMIN', FINC . 'admin/'); define('FFUNCTIONS', FINC . 'functions/'); // DEFINE WEB FOLDERS define('FURI', bb_get_uri()); define('FROOT', bb_get_active_theme_uri()); define('FCSS', FROOT . 'css/'); define('FJS', FROOT . 'js/'); define('FIMAGE', FROOT . 'images/'); // LOCALIZATION define('BBLANGUAGE_FOLDER', FPATH.'languages/'); bb_load_theme_textdomain(FTDOMAIN, BBLANGUAGE_FOLDER); // BBPRESS ADDS bb_enqueue_script('jquery'); // BBPRESS INTEGRATION FIXES (if magic quotes turned off) add_filter('pre_post', 'stripslashes', 40); add_filter('pre_post', 'stripslashes', 45); // 2nd Time add_filter('pre_topic_title', 'stripslashes', 40); add_filter('bb_add_topic_tags', 'stripslashes', 40); /***** REQUIRE FILES ON LOAD ******/ // DEEP INTEGRATION WITH WORDPRESS & THEME bb_load_template('deep_integration.php'); add_action( 'bb_user_logout', 'my_redirect' ); function my_redirect() { wp_redirect( home_url() ); } Share this post Link to post Share on other sites