I want to display a message in a plugin in public area of site, if admin is logged in, and another message, if anyone else (other than admin) is logged in.
Can someone please give me idea or show me an example, how to code that ?Thanks.
I think i have not provided enough info in question.
You can do something like:
<?php if(current_user_can('edit_users')) : ?>
<?php else : ?>
<?php endif; ?>
Hi, Thanks for your valuable information.
Sir, Can you please help me in one more thing, I need to get the value of a variable on top of the page, which is declared and defined in bottom of that page.
Declare it at the top? =p
You can't use it until it's declared, so you'll have to move it.
This topic is now archived. It is frozen and cannot be changed in any way.