Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • in reply to: How to add new fonts to Font Family in Kleo? #94635
     Jessica
    Participant

    So how do you change the font via CSS? I tried writing the following in the style.css of the child theme, and it only changes some of the fonts, seemingly dependent upon size, location, etc.

    COPY CODE
    body {
     font-family: "ヒラギノ明朝 ProN", "Hiragino Mincho ProN", "游明朝", "Yu Mincho", "メイリオ", Meiryo, Osaka, serif;
    }
    in reply to: Do not show front page after log in #85914
     Jessica
    Participant

    Hello! I am trying to accomplish the exact same thing with my website, but no matter what I do (please see attached image and code below for details), I’m getting redirected to the home page after logging in.

    I’m testing it out with these three accounts/roles:

    1. My Super Admin account (this gets redirected to the Dashboard as intended)
    2. My Administrator account via Facebook login (this gets redirected to the home page, i.e. http://www.mydomain.com)
    3. My Subscriber account via normal login (this also gets redirected to the home page)

    I might be missing something quite obvious, but I’m out of options and would like to have a fresh pair of eyes look at the problem… thank you in advance!

    Code for bp-custom.php with my little notes here and there.

    COPY CODE
    <?php
    
    /* Enable BuddyPress URL format www.localpathfinders.com/username */
    define ( 'BP_ENABLE_ROOT_PROFILES', true );
    
    /* Redirect to profile page after login */
    add_filter( 'login_redirect', 'bp_login_redirect_to_profile' );
    //  The return parameter does not have to be named $redirect_to for this function to work!
    function bp_login_redirect_to_profile( $redirect_url ) {
    
      // Redirect Super Admins and Administrators to backend Dashboard
      // THIS WORKS! <3
      if ( current_user_can( 'Super Admin' || 'Administrator' ) ) {
        $redirect_url = get_dashboard_url();
        return $redirect_url;
      }
      
      // Redirect everyone else to profile page
      // THIS DOES NOT WORK! </3
      else {
        $redirect_url = 'https://www.google.com'; // This does not redirect to Google, either!
        return $redirect_url;
        
        //  List of $redirect_url that did not redirect to profile page with normal login and Facebook login:
        //      get_option('home') . '/' . bp_core_get_username( bp_loggedin_user_id() );
        //      get_home_url() . '/' . bp_core_get_username( bp_loggedin_user_id() );
        //      home_url() . '/' . bp_core_get_username( bp_loggedin_user_id() );
        
        //      bp_loggedin_user_domain();
        //      bp_loggedin_user_domain($user->ID);
        //      bp_core_get_userlink( bp_loggedin_user_id() );
        //      bp_loggedin_user_domain( bp_loggedin_user_id() );
        
      }
    }
    
    /* Redirect to home page after logout */
    add_action('wp_logout','bp_logout_redirect_to_home');
    function bp_logout_redirect_to_home() {
      wp_redirect( home_url() );
      exit();
    }
    ?>
    Attachments:
    You must be logged in to view attached files.
Viewing 2 posts - 1 through 2 (of 2 total)

Log in with your credentials

Forgot your details?