Search Results for 'logout redirect'
-
AuthorSearch Results
-
May 7, 2016 at 4:50 pm #253203
Topic: Visual editor not working
in forum How-to & Troubleshootingandy60rm
ParticipantAfter installing Buddypress plugin, visual editor does not works correctly.
Wordpress 4.5.2
BuddyPress latest versionPlugins installed
=================
BAW Login/Logout menu 1.3.3.
Contact Form 7 4.4.2
Contact Form DB 2.10.9
Cryout Serious Theme Settings 0.5.6
Huge IT Slider 3.1.82
Limit Login Attempts 1.7.1
Link Library 5.9.12.18
LinkedIn Auto Publish 1.3.2
mathtex latex equation editor 1.1.5
New User Approve 1.7.3
Peter’s Login Redirect 2.9.0
Recent Posts Widget With Thumbnails 4.9.2
SI CAPTCHA Anti-Spam 2.7.7.7
Simple Share Buttons Adder 6.1.5
TablePress 1.7
Testimonials Widget 3.3.0
Tooltips 3.5.9
Twitter Follow Button 1.0.2
Ultimate Tables 1.6.3
User Access Manager 1.2.6.7
WP Content Copy Protection Premium (YOOPlugins) 1.8.32
WP Statistics 10.1
WP Support Plus Pro 7.0.1
WP Twitter Feeds 1.4.8
WP-Polls 2.73
WP-Pro-Quiz 0.37
WP-SpamShield 1.9.8March 11, 2016 at 3:39 am #251015ngoegan
ParticipantI’m running WordPress 4.4.2 with BP 2.5.1 and BBpress 2.5.8 with Twenty Twelve theme.
My registration page redirects to a login and I can’t register anymore. When I deactivate Buddypress, it works, when I activate it, it redirects.
A little background… I have installed and uninstalled a few login plugins “New User Approve” “WP User” and a couple others which didn’t work for me. So I finally found Theme My Login, which I installed and liked how it functioned – except it created and ran on secondary pages – (register-2, login-2) so I deleted the first register page and changed the new register page the plugin created permalink to just “register” instead of “register-2”
It didn’t work. So I deleted the register pages, uninstalled Theme My Login, and reinstalled it, hoping that would fix it. It didn’t. And now even though all the pages seem to be set correctly (login, register, logout) I can’t register because of this redirect.
Thank you for any assistance.
September 22, 2015 at 11:36 am #244675In reply to: Home URL redirects to Members page
adrift_
ParticipantOkay thanks, the plugin redirects after login or logout. My problem still is, that the logo and root URL link to the members page. Is there a solution for that (PHP would be okay)?
August 3, 2015 at 6:26 pm #242729In reply to: Styling BuddyPress Login Widget
Jld142
ParticipantThis is my current code:
<?php /* Link parent CSS file */ add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' ); function enqueue_parent_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } /* Count number of user notifications */ function cg_current_user_notification_count() { $notifications = bp_core_get_notifications_for_user(bp_loggedin_user_id(), 'object'); $count = !empty($notifications) ? count($notifications) : 0; echo $count; } /* Remove register BuddyPress Widget creator */ function remove_bp_core_register_widgets() { remove_action(bp_core_register_widgets()); } add_action('init','remove_bp_core_register_widgets()'); function new_bp_core_register_widgets() { add_action('widgets_init', create_function('', 'return register_widget("new_BP_Core_Login_Widget");') ); } add_action( 'bp_register_widgets', 'bp_core_register_widgets' ); /* New BuddyPress Login Widget */ class new_BP_Core_Login_Widget extends WP_Widget { /** * Constructor method. */ public function __construct() { parent::__construct( false, _x( '(BuddyPress) Log In', 'Title of the login widget', 'buddypress' ), array( 'description' => __( 'Show a Log In form to logged-out visitors, and a Log Out link to those who are logged in.', 'buddypress' ), 'classname' => 'widget_bp_core_login_widget buddypress widget', ) ); } /** * Display the login widget. * * @see WP_Widget::widget() for description of parameters. * * @param array $args Widget arguments. * @param array $instance Widget settings, as saved by the user. */ public function widget( $args, $instance ) { $title = isset( $instance['title'] ) ? $instance['title'] : ''; /** * Filters the title of the Login widget. * * @since BuddyPress (1.9.0) * @since BuddyPress (2.3.0) Added 'instance' and 'id_base' to arguments passed to filter. * * @param string $title The widget title. * @param array $instance The settings for the particular instance of the widget. * @param string $id_base Root ID for all widgets of this type. */ $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); echo $args['before_widget']; echo $args['before_title'] . esc_html( $title ) . $args['after_title']; ?> <?php if ( is_user_logged_in() ) : ?> <?php /** * Fires before the display of widget content if logged in. * * @since BuddyPress (1.9.0) */ do_action( 'bp_before_login_widget_loggedin' ); ?> <div class="bp-login-widget-user-avatar"> <a href="<?php echo bp_loggedin_user_domain(); ?>"> <?php bp_loggedin_user_avatar( 'type=thumb&width=50&height=50' ); ?> </a> </div> <div class="bp-login-widget-user-links"> <div class="bp-login-widget-user-link"><?php echo bp_core_get_userlink( bp_loggedin_user_id() ); ?></div> <p>TEST</p> <div class="bp-login-widget-user-logout"><a class="logout" href="<?php echo wp_logout_url( bp_get_requested_url() ); ?>"><?php _e( 'Log Out', 'buddypress' ); ?></a></div> </div> <?php /** * Fires after the display of widget content if logged in. * * @since BuddyPress (1.9.0) */ do_action( 'bp_after_login_widget_loggedin' ); ?> <?php else : ?> <?php /** * Fires before the display of widget content if logged out. * * @since BuddyPress (1.9.0) */ do_action( 'bp_before_login_widget_loggedout' ); ?> <form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post"> <label for="bp-login-widget-user-login"><?php _e( 'Username', 'buddypress' ); ?></label> <input type="text" name="log" id="bp-login-widget-user-login" class="input" value="" /> <label for="bp-login-widget-user-pass"><?php _e( 'Password', 'buddypress' ); ?></label> <input type="password" name="pwd" id="bp-login-widget-user-pass" class="input" value="" <?php bp_form_field_attributes( 'password' ) ?> /> <div class="forgetmenot"><label><input name="rememberme" type="checkbox" id="bp-login-widget-rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ); ?></label></div> <input type="submit" name="wp-submit" id="bp-login-widget-submit" value="<?php esc_attr_e( 'Log In', 'buddypress' ); ?>" /> <?php if ( bp_get_signup_allowed() ) : ?> <span class="bp-login-widget-register-link"><?php printf( __( '<a href="%s" title="Register for a new account">Register</a>', 'buddypress' ), bp_get_signup_page() ); ?></span> <?php endif; ?> </form> <?php /** * Fires after the display of widget content if logged out. * * @since BuddyPress (1.9.0) */ do_action( 'bp_after_login_widget_loggedout' ); ?> <?php endif; echo $args['after_widget']; } /** * Update the login widget options. * * @param array $new_instance The new instance options. * @param array $old_instance The old instance options. * @return array $instance The parsed options to be saved. */ public function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = isset( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; return $instance; } /** * Output the login widget options form. * * @param $instance Settings for this widget. */ public function form( $instance = array() ) { $settings = wp_parse_args( $instance, array( 'title' => '', ) ); ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'buddypress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label> </p> <?php } } ?>I was trying to following the below guide to remove the function that initializes the login widget and then redirect it to my own new one:
http://venutip.com/content/right-way-override-theme-functions
Obviously hasn’t worked. Any ideas ?
July 20, 2015 at 7:43 pm #242050In reply to: Redirect logged out users to a custom login page
valuser
ParticipantPerhaps have a look at http://buddydev.com/plugins/bpdev-logout-redirect/
it MAY be of some help !
July 10, 2015 at 10:19 am #241677fugu78
ParticipantI apologize but i am not sure where to add that line of code to the below redirect code:
add_filter("login_redirect","bpdev_redirect_to_profile",10,3); function bpdev_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user) { if(empty($redirect_to_calculated)) $redirect_to_calculated=admin_url(); /*if the user is not site admin,redirect to his/her profile*/ if(!is_site_admin($user->user_login)) return bp_core_get_user_domain($user->ID ); else return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/ } add_filter('logout_url',"bpdev_logout_url",100,2); function bpdev_logout_url( $logout_url, $redirect) { //simply ignore the redirect and set it to the main domain //let us check for buddyopress,if yes,let us get the bp root domain right ? if(function_exists("bp_core_get_root_domain")) $redirect=bp_core_get_root_domain(); else $redirect = get_blog_option( SITE_ID_CURRENT_SITE, 'siteurl' ); $args = array( 'action' => 'logout' ); if ( !empty($redirect) ) { $args['redirect_to'] = $redirect; } $logout_url = add_query_arg($args, site_url('wp-login.php', 'login')); $logout_url = wp_nonce_url( $logout_url, 'log-out' ); return $logout_url; } ?>March 21, 2015 at 8:42 pm #236354Mickey
ParticipantStatus of groups is all public, in fact i have no private groups at all, public (2) private (0) Hidden (0) when I go to groups menu.
These are my active plugins:
Adminimize
AG Custom Admin
Agreeable
Better Search Replace
BP Login Redirect
BP Profile Search
Buddypress – Who clicked at my Profile?
BuddyPress Cover Photo
BuddyPress Members only
BuddyPress Real Names
Custom Login URL
Email Login
K Elements
MAYO – Login Screen
Revolution Slider
rtMedia for WordPress, BuddyPress and bbPress
TM Replace Howdy
WPBakery Visual Composer
WPi Custom Logout
Go Daddy Quick SetupMarch 21, 2015 at 8:08 pm #236348Mickey
ParticipantI have the following active at the moment:
Adminimize
AG Custom Admin
Agreeable
Better Search Replace
BP Login Redirect
BP Profile Search
Buddypress – Who clicked at my Profile?
BuddyPress Cover Photo
BuddyPress Members only
BuddyPress Real Names
Custom Login URL
Email Login
K Elements
MAYO – Login Screen
Revolution Slider
rtMedia for WordPress, BuddyPress and bbPress
TM Replace Howdy
WPBakery Visual Composer
WPi Custom Logout
Go Daddy Quick SetupNone of them seem to deal with friend requests.
November 3, 2014 at 11:39 pm #228192In reply to: Top bar – Help me please
Paul Bursnall
ParticipantBy default Buddypress doesn’t have it’s own Login or Forgot Password pages. The behaviour of your site is correct. You could create your own page templates for separate pages, or use a plugin something like this:
https://wordpress.org/plugins/clean-login/ or
https://wordpress.org/plugins/zm-ajax-login-register/To redirect users on login/logout:
September 4, 2014 at 7:53 pm #189642In reply to: [Resolved] Remove Dashboard Access
JsonB123
ParticipantI wanted an Ajaxified login along with removal of dashboard access and I’m using 2 plugins:
Remove Dashboard Access
Login With AjaxLogin With Ajax also has a settings panel that allows you to redirect the users (globally or role based) upon login and logout, so it replaces the BP Redirect to Profile, as well, if you’re looking for that type of login functionality to go along with the redirect.
BP Redirect to Profile doesn’t block wp-admin access in and of itself, it just redirects the user to their profile upon login, but doesn’t block the admin if they put the URL in directly.
May 15, 2014 at 3:18 pm #182968In reply to: Logout redirect not work when installing BP
David Cavins
KeymasterDoes the logout redirect work if BuddyPress is deactivated (i.e. if you’re just running a typical WordPress site)?
January 2, 2014 at 9:11 pm #176319In reply to: hide bp homepage for loged in users
Gunjesh Gaurav
ParticipantI have already rewrite the login and logout rules.i am trying to restrict homepage only for logedin users (not admin) and redirect them to another bp page when they try to go on homepage like facebook style homepage.
October 1, 2013 at 7:34 am #172085kvschwartz
ParticipantIn my widget menu, I added a log out link, but it just goes to username/logout – Any way to redirect this to the home or login page?
June 30, 2013 at 7:48 pm #167296In reply to: too many redirects
mewrd
Participantthe problem is that , well , i can’t see the problem ,i can login and logout from two different computers with no problems at all ,it is just that client that seems to have login issues . i don’t know how to fix a problem that i can’t see?
i have tried to switch themes and deactivate plugins .is it something in the htaccess file?June 24, 2013 at 3:41 am #166696In reply to: Redirecting Logged in users to activity..
yaakhi
ParticipantSorrry but could not find the line you mentioned 🙁 here is the whole bp_profile_as_homepage_fork.php file `<?php
/*
Plugin Name: BP Profile as Homepage Fork
Description: Sets the user BP Profile as homepage on the site for logged in users. This emulates Facebook.
Author: Mort3n
Version: 1.0
License: GPL2
*//* Copyright 2013 Mort3n
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*//**
* Redirect logged-in user from site Homepage to Profile
* @since 1.0
*/
function bp_profile_as_homepage_fork_homepage(){global $bp;
$selected_role = get_option( ‘bpahpf_role_choice’ );
//redirection to profile applied to all roles
if( ” == $selected_role ){
if( is_user_logged_in() && is_front_page() ){wp_redirect( $bp->loggedin_user->domain, 302 );
exit;
}
}
//redirection to profile applied to all roles EXCEPT selected_role
else{
if( !bp_profile_as_homepage_fork_check_user_role( $selected_role ) && is_front_page() ){
wp_redirect( $bp->loggedin_user->domain, 302 );
exit;
}
}
}/**
* Redirect after logout
* @since 1.0
*/
function bp_profile_as_homepage_fork_logout_redirection(){global $bp;
$redirect = $bp->root_domain;
wp_logout_url( $redirect );
}/**
* Checks if a particular user has a role.
* Returns true if a match was found.
* Code for this function modified from http://docs.appthemes.com/tutorials/wordpress-check-user-role-function/
*
* @param string $role Role name.
* @param int $user_id (Optional) The ID of a user. Defaults to the current user.
* @return bool
*/
function bp_profile_as_homepage_fork_check_user_role( $role, $user_id = null ) {if ( is_numeric( $user_id ) )
$user = get_userdata( $user_id );
else
$user = wp_get_current_user();if ( empty( $user ) )
return false;return in_array( $role, (array) $user->roles );
}/**
* Add the admin page to the dashboard menu
* @since 1.0
*/
function bp_profile_as_homepage_fork_menu(){load_plugin_textdomain( ‘bpahpf-menu’, false, basename( dirname( __FILE__ ) ) . ‘/languages’ );
add_options_page( __(‘BP Profile as Homepage Fork Settings’, ‘bpahpf-menu’ ), __( ‘BP Profile as Homepage Fork Settings’,’bpahpf-menu’), ‘manage_options’, ‘bpahpfmenu’, ‘bpahpf_settings_page’);
}/**
* Outputs the settings screen and saves data when submitted
* @since 1.0
*/
function bpahpf_settings_page(){//check for capability to manage options
if ( !current_user_can( ‘manage_options’ ) ){wp_die( __(‘You do not have sufficient permissions to access this page.’, ‘bpahpf-menu’ ) );
}
$opt_name = ‘bpahpf_role_choice’;
$data_field_name = ‘bpahpf_role_choice’;$opt_val = get_option( $opt_name );
//if nonce checks out then save submitted data
$nonce=$_REQUEST[‘_wpnonce’];
if( wp_verify_nonce( $nonce, ‘bpahpf’ ) )
{
$opt_val = $_POST[ $data_field_name ];
update_option( $opt_name, $opt_val );
?>
<div class=”updated”><p><?php _e( ‘Settings saved.’, ‘bpahpf-menu’ ); ?></p></div>
<?php}
echo ‘<div class=”wrap”>’;
echo “<h2>” . __( ‘BP Profile as Homepage Fork Settings’, ‘bpahpf-menu’ ) . “</h2>”;
?>
<p>
<?php _e( ‘Disable Profile as Homepage for a particular user role.’, ‘bpahpf-menu’ ); ?>
</p>
<form name=”bpahpf-settings-form” method=”post” action=””>
<?php wp_nonce_field( ‘bpahpf’ ); ?>
<p><b>
<?php _e( ‘You have selected:’, ‘bpahpf-menu’ ); ?>
</b>
<?php
if ( ” == $opt_val )
_e( ‘No One’, ‘bpahpf-menu’ );
else
echo $opt_val;
?>
<hr />
<?php _e( ‘Who can view Homepage:’, ‘bpahpf-menu’ ); ?>
<select name=”<?php echo $data_field_name; ?>”>
<option value=””>
<?php _e( ‘No One’, ‘bpahpf-menu’ ); ?>
</option>
<?php wp_dropdown_roles( );?>
</select>
</p>
<p class=”submit”>
<input type=”submit” name=”Submit” class=”button-primary” value=”<?php esc_attr_e( ‘Save Changes’, ‘bpahpf-menu’ ) ?>” />
</p>
</form>
</div>
<?php
}add_action(‘admin_menu’,’bp_profile_as_homepage_fork_menu’);
add_action(‘wp’,’bp_profile_as_homepage_fork_homepage’);
add_action(‘wp_logout’,’bp_profile_as_homepage_fork_logout_redirection’);
?>June 18, 2013 at 8:25 pm #166344In reply to: redirect to profile page?
bp-help
Participant@famous
Try this just make sure you follow the instructions in the commented code. Place it in bp-custom.php :/* Redirects to profile upon login, and upon logout redirects to activity page unless changed */ function bp_help_redirect_to_profile(){ global $bp_unfiltered_uri; $bphelp_my_front_page = 'activity'; // WARNING: make sure you replace 'activity' in this line to the same thing you set dashboard/settings/reading front page to. if ( !is_user_logged_in() && ( $bp_unfiltered_uri[0] != $bphelp_my_front_page ) ) bp_core_redirect( get_option('home') ); elseif( is_user_logged_in() && ( $bp_unfiltered_uri[0] == $bphelp_my_front_page ) ) bp_core_redirect( get_option('home') . '/members/' . bp_core_get_username( bp_loggedin_user_id() ) . '/profile' ); } add_action( 'wp', 'bp_help_redirect_to_profile', 3 );June 18, 2013 at 8:13 pm #166341In reply to: redirect to profile page?
bp-help
Participant@famous
Try this just make sure you follow the instructions in the commented code. Place it in bp-custom.php :/* Redirects to profile upon login, and upon logout redirects to activity page unless changed in line 6 */ function bp_help_redirect_to_profile(){ global $bp_unfiltered_uri; $bphelp_my_home_page = 'activity'; // WARNING: make sure you replace 'activity' in this line to the same thing you set dashboard/settings/reading front page to. if ( !is_user_logged_in() && ( $bp_unfiltered_uri[0] != $bphelp_my_home_page ) ) bp_core_redirect( get_option('home') ); elseif( is_user_logged_in() && ( $bp_unfiltered_uri[0] == 'activity') ) bp_core_redirect( get_option('home') . '/members/' . bp_core_get_username( bp_loggedin_user_id() ) . '/profile' ); } add_action( 'wp', 'bp_help_redirect_to_profile', 3 );June 12, 2013 at 4:17 am #165810In reply to: redirect to profile page?
bp-help
Participant@famous
That is a little strange. Are using mutisite? On a single site BP install the login/logout shows in the sidebar with the Meta Widget. Are you using a full width template? If so you can use this plugin to provide a login in the toolbar which I use with a full page template with WP 3.5.1 and BP 1.7.2 and it works, get it here:
https://wordpress.org/plugins/admin-bar-login/
Please provide as much info as you can on your install. If I can’t help, it will help others to help you. Thanks!June 11, 2013 at 3:29 am #165746In reply to: redirect to profile page?
bp-help
Participant@famous
To redirect to profile add the following code courtesy of @sbrajesh at BuddyDev to your bp-custom.php :/*Make sure profile is default component*/ define('BP_DEFAULT_COMPONENT','profile'); /*let us filter where to redirect */ add_filter("login_redirect","bpdev_redirect_to_profile",10,3); function bpdev_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user) { if(empty($redirect_to_calculated)) $redirect_to_calculated=admin_url(); /*if the user is not site admin,redirect to his/her profile*/ if(!is_site_admin($user->user_login)) return bp_core_get_user_domain($user->ID ); else return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/ }For logout use the following code also courtesy of @sbrajesh to redirect back to your home url:
add_filter('logout_url',"bpdev_logout_url",100,2); function bpdev_logout_url( $logout_url, $redirect) { //simply ignore the redirect and set it to the main domain //let us check for buddyopress,if yes,let us get the bp root domain right ? if(function_exists("bp_core_get_root_domain")) $redirect=bp_core_get_root_domain(); else $redirect = get_blog_option( SITE_ID_CURRENT_SITE, 'siteurl' ); $args = array( 'action' => 'logout' ); if ( !empty($redirect) ) { $args['redirect_to'] = $redirect; } $logout_url = add_query_arg($args, site_url('wp-login.php', 'login')); $logout_url = wp_nonce_url( $logout_url, 'log-out' ); return $logout_url; }April 22, 2013 at 8:00 pm #162379In reply to: On logout, page redirects to WP Login
pfrey
ParticipantYeah, I ran across that webpage and I did try using home_url() and still had the same redirection after logging out.
I found the Peter’s Login Redirect plugin today, and it worked for me. It’s a little overkill for what I need it for, but it’s the only thing I could do to make it work!
So if you have any other ideas, I’m open to them, otherwise I suppose I will be using the extra plugin.
Thanks!
April 22, 2013 at 5:59 pm #162366In reply to: On logout, page redirects to WP Login
David Cavins
KeymasterStill didn’t work. Available here: http://pastebin.com/ZtFWhqyg
April 22, 2013 at 5:58 pm #162365In reply to: On logout, page redirects to WP Login
David Cavins
KeymasterWell that code bit got mixed up, let’s try that again:
`<a href="” title=”Log out”>`
April 22, 2013 at 5:56 pm #162364In reply to: On logout, page redirects to WP Login
David Cavins
KeymasterHi Patty-
Have you tried using `home_url()` instead of `site_url()` like the example on the Codex: https://codex.wordpress.org/Function_Reference/wp_logout_url#Logout_and_Redirect_to_Homepage
I use this on my site and it redirects to the home page:
`<a href="” title=”Log out”>`-David
April 22, 2013 at 2:38 pm #162338In reply to: On logout, page redirects to WP Login
pfrey
ParticipantI’ve seen some other tickets from a long time ago, but didn’t want to re-open a dead ticket. But none of them seemed to be resolved. If anyone can help me I’d really appreciate it.
February 22, 2013 at 12:13 am #153668In reply to: Logout button redirect to home page
modemlooper
Moderatoryou can include a hard coded link https://codex.wordpress.org/Function_Reference/wp_logout_url
-
AuthorSearch Results