AlCaldarone.com @AlCaldarone
Code
Assign permissions
Gather requirements
Develop schema
Plan
Connection strings
Assign relationships
Database
SQL
PHP
S...
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...
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' ),
'...
pick a template
any template
single.php
page.php
archive.php
comments.php
sidebar.php
header.php
search.php
index.php
foot...
<?php // {Modeled from page.php}
/*
Template Name: Members Page
*/
if ( is_user_logged_in() ) {
get_header(); ?>
<div id="...
<?php
// Added to sidebar.php
if ( is_user_logged_in() ) : ?>
<div id="secondary" class="widget-area" role="complementary"...
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 & feel
with
Page redirect options based on User Role
AlCaldarone.com
@AlCaldarone
Thank You!
Done and
Done!
Members access
Members access
Members access
Members access
Members access
Upcoming SlideShare
Loading in …5
×

Members access

3,432 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,432
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
35
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Members access

  1. 1. AlCaldarone.com @AlCaldarone
  2. 2. 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
  3. 3. Heavy lifting is done!
  4. 4. Plugin vs. DIY
  5. 5. 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
  6. 6. A combination of simple concepts WP Admin + Basic PHP
  7. 7. Register sidebar widget PHP Add conditional statements Create a template Let WordPress do the rest
  8. 8. <?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>', ) ); ?>
  9. 9. pick a template any template single.php page.php archive.php comments.php sidebar.php header.php search.php index.php footer.php 404.php
  10. 10. <?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() ?>
  11. 11. <?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 deal for the sidebar widget
  12. 12. Wrap is_user_logged_in() around anything you want to restrict
  13. 13. Add custom menu Members Sidebar
  14. 14. Set template
  15. 15. Custom Login and Registration Customize WordPress login look & feel with Page redirect options based on User Role
  16. 16. AlCaldarone.com @AlCaldarone Thank You! Done and Done!

×