Try this and let me know if it works. The syntax might be off. This would require you to add the id of each author that works for the site.
$getid = $posts[0]->post_author;
if($getid == 3){
// Do something that is specific for user with ID 3
<div id="authorbox">
<?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?>
<div class="authortext">
<h4>About <?php the_author_posts_link(); ?></h4>
<p><?php the_author_description(); ?></p>
</div>
</div>
}
else{
// Do Nothing
}
Thanks for responding!
Yes, when I try that code it has a syntax error
Parse error: syntax error, unexpected '<'
You may have to open and close php in spots to get it to work. Anyway, I think $getid = $posts[0]->post_author;
is the direction you need to go. Sorry i suck at PHP still. See if this changes anything.
<?php $getid = $posts[0]->post_author;
if($getid == 3){?>
// Do something that is specific for user with ID 3
<div id="authorbox">
<?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?>
<div class="authortext">
<h4>About <?php the_author_posts_link(); ?></h4>
<p><?php the_author_description(); ?></p>
</div>
</div>
<?php}
else{
// Do Nothing
}?>
Hey, perfect, I was actually just now trying closing of the tags and also using echo ‘authorbox code’;. However, I had put the closing } before the second <?php
And, this code works! I just had to put a space between <?php and } but it works.
And actually, it blocks out the code on every page except UserID 3. So I just reversed it and it works so well. Thanks for your help!
FYI, here is what I ended up doing:
<?php $getid = $posts[0]->post_author;
if($getid == 3){
// Do Nothing
}
else{
?>
// Do something that is specific for user with ID 3
<div id="authorbox">
<?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?>
<div class="authortext">
<h4>About <?php the_author_posts_link(); ?></h4>
<p><?php the_author_description(); ?></p>
</div>
</div>
<?php
}
?>