Re: make links
| From: | Adam Preece | Date: | Mon, 02 May 2011 16:55:29 +0000 |
| Subject: | Re: make links | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-312628@lists.php.net to get a copy of this message | ||
hi, then use this.
> <?php
> if (current_user_can('level_10')) : ?>
> <?php print "<a
> href=\"http://www.google.com\"
> target=\"_self\">My Link</a>"; ?>
> <?php elseif (current_user_can('level_6')) : ?>
> <?php print "read and comment only"; ?>
> <?php else : ?>
> <?php print "you gotta log-in to see the goodies"; ?>
> <?php endif; ?>
hope this helps
Adam
On 2 May 2011, at 17:49, Michael Simiyu wrote:
> hello,
>
> i want to add links to the code below in wordpress ie where it says "control the
> world" and "read and comment only" i want to make it a link <a
> href="http://www.google.com"
> target="_self">My Link</a>
>
> <?php
> if (current_user_can('level_10')) : ?>
> <?php print "control the world"; ?>
> <?php elseif (current_user_can('level_6')) : ?>
> <?php print "read and comment only"; ?>
> <?php else : ?>
> <?php print "you gotta log-in to see the goodies"; ?>
> <?php endif; ?>
>
> Thanks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>