• Dear friends,

    I display some ads in my sidebar using text widget (with tag from the ad network). Depending on the mobile device resolution, sidebar may be collapsed.

    I want to know if even though the sidebar is hidden, does it still execute the widget code and probably contact ad server to get the ad? It will not be visible until user expands the sidebar.

    I don’t know how to verify it. Any insight will be helpful from the community.

    If the answer is Yes, is there a way not to execute the code if the resolution is:
    primary bar – between 480 and 960
    Secondary bar – between 480 and 1200

    Thanks!

Viewing 1 replies (of 1 total)
  • Hi wp169. The presentation of the page doesn’t affect the underlying code; it still runs when the page is refreshed. Maybe someone more familiar with the ad network can suggest a way to verify that. To keep the code from executing at certain widths you’d probably need to use a widget like Enhanced Text Widget and some jQuery like this to write the ad code html based on the screen width. Perhaps someone else on the forum here knows of a different way to accomplish this.

Viewing 1 replies (of 1 total)
  • The topic ‘Does widget code gets executed when sidebar is collapsed?’ is closed to new replies.