[theme-reviewers] Toolbar on Frontend Question

Srikanth Koneru tskk79 at gmail.com
Sun Oct 6 16:31:06 UTC 2013


+1


On Sun, Oct 6, 2013 at 9:56 PM, Justin Tadlock <justin at justintadlock.com>wrote:

>  Use:
>
>
>     if ( is_admin_bar_showing() )
>         echo 'true';
>     else
>         echo 'false';
>
> Or:
>
>     if ( true === is_admin_bar_showing() )
>
>         echo 'true';
>     else
>         echo 'false';
>
> Or:
>
>     echo is_admin_bar_showing() ? 'true' : 'false';
>
> I think these questions are perfectly fine for a mailing list like this.
> We are theme developers, after all.  Why not help each other with actual
> code problems once in a while?  It breaks up the routine of arguing over
> every minute detail of what's allowed or not allowed in a theme.  It's
> refreshing.  I'd like to see more of this.
>
>
>
> On 10/6/2013 6:41 AM, Ronnel Angelo wrote:
>
> Why not try.
>
>  if ( is_admin_bar_showing() ) {
>  echo 'true';
> }
>  else {
>  echo 'false';
> }
>
>  I think question like these are better asked on the support forums and
> not here on the theme-reviewers.
>
>
> On Sun, Oct 6, 2013 at 7:02 PM, Phillip Wells <phillipwells at hotmail.co.nz>wrote:
>
>>  I am currently making a theme and i need to use is_admin_bar_showing();
>> i have this code below
>> if ( is_admin_bar_showing() ==true ){
>> echo'true';
>> }
>>  elseif ( is_admin_bar_showing() == false ){
>> echo'false';
>> }
>>  endif;
>>
>>  However this doesn't work and i am not sure why.
>>
>>  The description on the codex is: This Conditional Tag<http://codex.wordpress.org/Conditional_Tags> checks
>> if the WordPress Toolbar<http://codex.wordpress.org/Administration_Screens#Toolbar> is
>> being displayed. This is a boolean function, meaning it returns either TRUE
>> or FALSE. and here is a link to the page on the codex
>> http://codex.wordpress.org/Function_Reference/is_admin_bar_showing. I
>> have checked this page but i still cannot figure out how to do it as this
>> page is not very helpful.
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>
>
>  --
> http://ronangelo.com
>
>
> _______________________________________________
> theme-reviewers mailing listtheme-reviewers at lists.wordpress.orghttp://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20131006/83e2037e/attachment-0001.html>


More information about the theme-reviewers mailing list