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

Konrad Pilch
Konrad Pilch
2,435 Points

Login with WordPress or so [...]

HI,

I im re-doing someone website in a week, its gonna be challenge for me for sure, but a week with Zac , its maybe enough, though i understand queries and all that , im just about to make blog without any help from Zac vidoes coz i understand it, apart from some things like widget as thats kinda tricky atm and pagination .

But when i looked at the webiste, it shows that a Sport Team can register, and then Login and fiew? i dont know games played, ranking in that? so how can i make that with wordpress? im sure i checked WP vidoes but didnt found anything about login , it should be simple i bleive .

Basically, if you look at more robust? pages here like

If you look at like the last two pages, thats something else .

Its a friend of mine btw and i told him i could re-design it as its not responsive. If id take an extra week or so im sure he wont mind.

Please if someone can post tips and stuff on how to make it with WordPress the tables .

1 Answer

WordPress has various levels for users, you can easily use the built in functionality to allow users to register the site and restrict certain pages to be viewable only by those who are logged in. You could also use a plugin like User Access Manger if you need more granular controls : https://wordpress.org/plugins/user-access-manager/ .

Here are some other options: http://wpdevshed.com/members-only-on-your-wordpress-website/

In the past, here is how I have handled setting up pages to only show content for logged in users. You will have to modify this to suit your needs.

<?php
if ( is_user_logged_in() ) {
    echo 'Welcome, registered user!';
} else {
    echo 'Do something else, redirect, show a form, etc';
}
?>
Konrad Pilch
Konrad Pilch
2,435 Points

Okay! Thank you ! I did a simple login and registration with pure php but it was not OOP but i know the way it should kinda work , if i didnt forget. Thank you :) Ill check it out soon .