Mais conteúdo relacionado Semelhante a Members access (20) Members access6. 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
9. <?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>',
) );
?>
10. 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
11. <?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()
?>
12. <?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
20. Custom Login and Registration
Customize WordPress login look & feel
with
Page redirect options based on User Role