Hi, I want to add the login module in home page (like in frisco demo site), but i’m not able to find the right way. Can you help me? Thanks
yaa i too want to know the same thing.. 🙁 anybody help please
You’ll need to do things.
First, lock-down the site so that only logged in users can access it.
I just added a basic conditional to check if a user is logged in. If they are not logged in, they get redirected to my register page (slug is /join).
This is done through a bp-custom.php file that sits in my plugins directory.
Here it is: http://pastebin.com/rgJ6BQc8
Next you need to add a friendly message and login form to the initial registration page. This gives users a heads up they have to register if they haven’t already, and it provides an opportunity for returning users to log in.
I did this by creating a file called “functions-custom.php” in my Frisco theme directory. Then I went to Frisco theme options and enabled the custom functions file. Here’s the code from that file.
You’ll need to add some custom CSS to style the welcome message/login.
hey i understood the first part… but didnt understood the second part can u give the frisco demo site css for that page ?? please.. 🙂
Do you have Firebug for Firefox installed or something like it? All of the CSS files are accessible if you just look in the <head> of any page.
ohh thanks .. it works really cool.. 😀 🙂 ur awesome dud !!!!
I’m confused. Where am I putting bp-custom.php. Is that a file that already exists, or does it need to be created and put into the wp-content/plugins folder?
I’ll just go ahead and answer my own question. The answer is yes, you create the bp-custom.php file in the wp-content/plugins folder.
Thanks for your solution David.
I tried this and am getting this error message
“The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”
I’m receiving the same error that 2twins is getting. Any idea what is going wrong?
For those of you who are getting a “The page isn’t redirecting properly”, make sure to change edit this line in bp-custom.php:
bp_core_redirect( get_option('home') . '/join' );
If “join” is not the slug to your BuddyPress registration page, then you need to update it. Also, for those of you who are not using multisite, bp-custom.php should be installed in the plugins folder and I would suggest renaming bp-custom.php to something like bp-custom.php and make sure to add the usually plugin header:
/* Plugin Name: Frisco Privacy Plugin URI: http://friscotheme.com/ Description: Makes BuddyPress site private for those using the Friscotheme. Version: 1.0 Author: David Carson Author URI: http://friscotheme.com/ License: GPLv2 or later */
Thanks for the response Joshua.
I’ve gotten this to work for the most part, but it does not look like the “functions-custom.php” file is doing its job as my register page is not showing the option for existing users to login. I’ve checked that the “funcitons-custom.php” file is in my Frisco theme directory. Not sure why this isn’t working properly- any thoughts?
@transpogroup, did you copy and paste the functions-custom.php file as is, or did you make some changes? Are you styling the registration form in anyway that may make it look like the fields are not there?
Hi Joshua- I pasted the code that David provided and did not add any changes or additional styling. The only thing that I am doing differently is using a register page with the slug “/register” instead of “/join” and have updated the “bp-custom.php” file to reflect this change as you noted above.
Is your file named bp-custom.php and where did you install it?
- The topic ‘[Theme: Frisco for BuddyPress] Login in Home page’ is closed to new replies.