*/
// Get current user values
-if(isset($_GET['author_name'])) :
- $curauth = get_user_by( 'login', '' );
+if ( is_member() ) :
+
+ $member_name = get_member_name();
+ $member_id = get_member_data("id");
+ $member_slug = get_member_data("member_slug");
+//elseif(isset($_GET['author_name'])) :
+// $curauth = get_user_by( 'login', '' );
else :
- $curauth = get_userdata(intval($author));
+ $curauth = get_userdata(intval($member_id));
+ $author_id = $curauth->ID;
endif;
-$author_id = $curauth->ID;
if ( ! is_active_sidebar( 'sidebar-2' ) ) {
}
?>
-<aside id="secondary" class="widget-area" role="complementary">
+<aside id="secondary" class="widget-area" role="complementary">
+ <section class="widget sidebar" style="display: none;">
+ <h2 class="widget-title news-feed-title">What's Happening</h2>
+ <div class="widget-container"><?php echo get_new_royalslider(2); ?></div>
+ </section>
<?php if (! dynamic_sidebar('sidebar-top-ad')):endif; ?>
<?php
- //echo $curauth->user_nicename;
- //$string .= $curauth->nickname;
$args = array(
- // combine user nickname and selected tags into query
-
- 'tag' => $curauth->user_nicename,
- //'tag' => 'founders-brewing-company',
+ 'tag' => $member_slug,
'orderby' => 'rand',
'posts_per_page' => 8,
'order' => 'DESC',
$loop = new WP_Query( $args );?>
<?php if ($loop->post_count == 0) { ?>
-
+ <h2>No posts</h2>
<?php } else { ?>
-
<section class="widget sidebar">
- <h2 class="widget-title news-feed-title">What's Happening <?php echo '<br>at '.$curauth->nickname; ?></h2>
+ <h2 class="widget-title news-feed-title">What's Happening <?php echo '<br>at '.$member_name; ?></h2>
<div class="widget-container">
// combine user nickname and selected tags into query
//'tag' => $curauth->nickname . $string,
'post_type' => 'deal',
- 'author' => $author_id,
+ 'author' => $member_id,
'orderby' => 'rand',
'posts_per_page' => 3,
'order' => 'DESC'