Skip to:
Content
Pages
Categories
Search
Top
Bottom

Redirecting to BBPress profile via functions.php


  • bbpressuserkb
    Participant

    @bbpressuserkb

    Hello,

    I added the follwoing code to functions.php

    add_action( ‘init’, ‘blockusers_init’ );
    function blockusers_init() {
    if ( is_admin() && ! current_user_can( ‘administrator’ ) &&
    ! ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) {
    wp_redirect( bbp_user_profile_link( bbp_get_current_user_id() ) );
    exit;
    }
    }

    This redirects users to http://www.mydomainame.org/wp-admin/profile.php
    and displays a link to their BBPress Profile.
    Question is, how do I redirect users directly to to their BBPress profile?

    This is probably something very simple, but I am not a developer unfortunately.

    Thanks for your help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar