members access
TRANSCRIPT
AlCaldarone.com @AlCaldarone
Code
Assign permissions
Gather requirements
Develop schema
Plan
Connection strings
Assign relationships
Database
SQL
PHP
Security
Normalize tables
Encryption
Login page
Registration page
Lost password
Validations
Heavy lifting is done!
Plugin vs. DIY
Top 5 Reasons I Did It MyselfTop 5 Reasons I Did It Myself
5) Client only had basic needs
4) Plugin Shmugin
3) Simpler for the client to maintain
2) I’m a glutton for punishment
1) Just kidding, it was actually super easy to develop and expand
*Please don’t sue me Mr. Letterman
A combination
of simple concepts
WP Admin + Basic PHP
Register sidebar widget
PHP
Add conditional statements
Create a template
Let
WordPress do the rest
<?php//MEMBER SIDEBAR - Goes in Functions.php
register_sidebar( array( 'name' => __( ‘ATC Members Area', 'twentyten' ),
'id' => 'atc-members-area',
'description' => __( 'The ATC Members area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>',
) );
?>
pick a template
any template
single.php
page.php
archive.phpcomments.php
sidebar.php
header.php
search.php
index.php
footer.php
404.php
<?php // {Modeled from page.php} /*Template Name: Members Page*/
if ( is_user_logged_in() ) {get_header(); ?>
<div id="container"><div id="content" role="main">
<?php get_template_part( 'loop', 'page' );?>
</div> <!-- #content --></div> <!-- #container -->
<?php get_sidebar(); get_footer();
} else {wp_redirect( 'http://www.AnyWebsite.com/' );
} //End is_user_logged_in()
?>
<?php// Added to sidebar.php
if ( is_user_logged_in() ) : ?><div id="secondary" class="widget-area" role="complementary">
<ul class="xoxo"><?php dynamic_sidebar( 'atc-members-area' ); ?>
</ul></div> <!-- #secondary .widget-area -->
<?php endif; ?>
Same dealfor the
sidebar widget
Wrap
is_user_logged_in()around anything
you want to restrict
Add custom menu
Members Sidebar
Set template
Custom Login and Registration
Customize WordPress login look & feelwith
Page redirect options based on User Role
AlCaldarone.com@AlCaldarone
Thank You!
Done and Done!