I'm looking to build a membership site with Wordpress. I have a decent amount of experience with wordpress, but always wondered if it's possible to create a custom dashboard for logged in members?

For example, in my membership site, members will have 100 virtual points monthly. Each time that member purchases something from me, I want to deduct from their points and display how many points they have remaining on that dashboard.

I've seen a few sites with a custom page for each different account before, but have no clue how to do this.

Thanks all


The simplest method would be to create a single page and use a custom page template.

For example, make a page with slug my-account. Then create a template and name it page-my-account.php.

Then within that template, check if the user is logged in, and load their data if they are.

if( is_user_logged_in() ){
    $current_user = wp_get_current_user();
    echo 'Username: ' . $current_user->user_login . '<br />';
    echo 'User ID: ' . $current_user->ID;
} else {
    echo 'You must be logged in to view this page';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.