I could also accomplish this an opposite way by changing where it directs a user who logs in. In other words if the pre-loop code or the loop code don’t have any way to say “You’re currently logged in as you so I’m gonna show you your posts and nobody elses” then another solution would be to change the re-direct after a user logs in.
For example:
Fred logs in, and instead of it taking him to the dashboard, it’s coded to send him to his author page. I saw a cool site that said how to do this, but not automatically:
https://www.kpdesign.net/wordpress/allowing-limiting-user-access-in-wordpress/
But it’s through manually adding lines of code. IE:
<strong><?php echo $user_identity ?></strong></li>
<?php get_currentuserinfo(); if ('2' == $user_ID) { ?>
<li><a href="<?php bloginfo('url') ?>/clients/client1/" rel="nofollow" title="<?php _e('Your account summary'); ?>"><?php _e('Account summary'); ?></a></li>
<?php } ?>
<?php get_currentuserinfo(); if ('3' == $user_ID) { ?>
<li><a href="<?php bloginfo('url') ?>/clients/client2/" rel="nofollow" title="<?php _e('Your account summary'); ?>"><?php _e('Account summary'); ?></a></li>
<?php } ?>
<?php get_currentuserinfo(); if ('4' == $user_ID) { ?>
<li><a href="<?php bloginfo('url') ?>/clients/client3/" rel="nofollow" title="<?php _e('Your account summary'); ?>"><?php _e('Account summary'); ?></a></li>
<?php } ?>
Thus I’d have to add a new block of code to the links everytime a new author is added. We will be adding authors all the time, so it’d be best if that was dynamic and could just
<?php get_currentuserinfo(); if
followed up by some “go to THAT AUTHORS page”. I just don’t know if that’s possible.