• Resolved igc

    (@igc)


    I have some third party tracking-script code in sidebar Text widget, it gives out crucial site data to visitors, which I suppose make it Invisible and how?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Site url? Have you added this code the the sidebar yet?

    Thread Starter igc

    (@igc)

    Of course I added the code, frankly speaking its feedjit code, gives out live traffic details, its handy indeed.. I just want to make that widget Invisible to public

    By using widget’s ID or something like that, b’coz I’m not aware of coding

    Thanks esmi

    Site url?

    Place your code inside this..

    <?php if ( current_user_can('manage_options') ) { ?>
    // YOUR HTML CODE HERE
    <?php } ?>

    Or if PHP…

    <?php if ( current_user_can('manage_options') ) {
    // YOUR CODE HERE
    } ?>

    Regular visitors and/or subscribers won’t see anything..

    Can you run php inside a text widget?

    Good point…

    Wrap the widget code with the user check in that case…

    Assuming it’s a widget registered in the theme functions file or a plugin file, just pop open that file, find the area that prints the info, then wrap the user check around that…

    Shouldn’t be too hard..

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Make Invisible text-Widget in Sidebar?’ is closed to new replies.