Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

How to use Bootstrap login snippets with wordpress

After finishing my bootstrap to wordpress course I was trying to push my abilities and figured I would try to set up a modal register / login form. I found lots of great bootstrap login snippets and managed to get them to show up, however I am having problems setting them up to actually function properly within wordpress.

Here is the link to one of the snippets I was trying to use. It appears to function, however, the register button does not work on my end.

http://bootsnipp.com/snippets/featured/login-and-register-tabbed-form

I googled for hours and stared at the codex until I was ready to scream so I figured I should just ask someone.

I know there are tons of plugins out there but I really wanted to avoid using yet another plugin.

If anyone can point me into the right direction I would greatly appreciate it.

11 Answers

Could you paste your code that you put into wordpress?

Ok I think I may know where your problem is. The snippet that you posted has some JS code also that makes the register tab function. Did you add that in also?

Yes I pasted it in directly as it was shown. I am confused as to how to tie in the sign in function and register function into my wordpress site.

Your JS code would have to go into theme files

Yeah I pasted it into my theme.js file within my js folder.

And your theme.js is linked into wherever your form snippet is? Did you happen to change any of the ids?

Do you by chance have a url to your form?

I do not, I am working on this over my localhost.

I made a new form in ninja forms, have any tips as to what I should do next to get them to jive?

Sorry :/ Never done local development I use wpengine for all my wordpress work

alright, I guess its beyond my grasp and would require more php knowledge then I currently possess. Pretty frustrating. Two days trying to figure this out is enough time. Im done with it.

Konrad Pilch
Konrad Pilch
2,435 Points

Are you trying to make a login with WordPress?

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Yeah, this is a bit of a tricky thing. The approach is a little backwards.

You would need to start with adding the WordPress login form using the proper WP code. For example wp_register() and wp_loginout(). You could then add that inside of the snippet. You may need to do some customizations via CSS to get it looking just right or even use the functions.php file to customize how these functions are displaying code. You can find some help and examples on the Codex pages for each function.

Also, you would need to make sure that the JS file is included in your functions.php file with all the other enqueued files.

Konrad Pilch
Konrad Pilch
2,435 Points

Could you make a tutorial about how to make a little social website with WordPress please? I mean something like Workspace? You did on parallax effect before , this kind of thing.

So people can register, have little profile, post something and message others maybe .