WordPress Inside Joke Prank
-
I want some piece of code that will see if the person who posted a post is author_ID #3 and I want it to display Ricky Martin instead of his name. I was just looking around various things but I can’t figure out how to make the_author() not return anything. Maybe if someone can point that out I’ll see how I can make it return but not echo the name.
<?php if (the_author()=="User Name" && $user_ID!=3 && $user_level > 0 && ($user_ID=1 || $user_ID=7 || $user_ID=5 || $user_ID=2 || $user_ID= 4)){ echo "<a href=".get_bloginfo('template_directory')."/images/ricky_martin.jpg>Ricky Martin</a>"; } else { the_author_posts_link(); }?>This code seemed to work but it only works for the first post. The_author has no parameters.. I just found that the_author(”,false) somewhere and tried it and it worked.
Do you guys get what I am trying to do here? Help is most appreciated. Making users 2,4,5 and 7 be the only people to see Ricky Martin and it only says Ricky Martin if someone is logged on AND of course uID#3 doesn’t know or suspect anything.
The topic ‘WordPress Inside Joke Prank’ is closed to new replies.