• Hello friends,
    I created an option page in my theme where the user can enable or disable banner display in sidebar and also select the number of banners to display.

    TO enable and disable banners display I used the IF statement

    <?php if ( get_option('czr2_ads') == "Enable") { ?>

    And within this statement I inserted UL LI tages with <A href … <img ..

    PROBLEM:
    I need to wrap the LI tag under a “WHILE” loop but I dont know how to do that, I tried something like this

    <?php while ( get_option('czr2_big_ads_number') <= "2") { ?>
    But this flooded the sidebar.

    Friends kindly help me to create the proper “While” loop and also few fields below it i.e. how to add the link and img source for each li.

  • The topic ‘loop for banner li’ is closed to new replies.