Viewing 7 replies - 1 through 7 (of 7 total)
  • Phil

    (@owendevelopment)

    Hi,

    You can use something like this:

    <?php if (is_home()) { ?>
    Place your HTML or other code here for homepage only.
    <?php } ?>
    Thread Starter skintinthecity

    (@skintinthecity)

    Thank you.
    However, I don’t understand. Where would I put this code and how?

    Phil

    (@owendevelopment)

    The code I gave you would need to go into a PHP template.

    It’s the only way really of doing it as you cannot do this through widgets as they don’t like PHP unless you use a plugin like this
    .

    Thread Starter skintinthecity

    (@skintinthecity)

    Thank you Phil.
    I’ve installed the plug in you suggested. However to be honest I am stuck as to what to do with it next.
    This is a learning curvbe for me – first ad – and once I’ve got this sorted it should be easier next time.
    I currently manage the ad size 300×250 widget via Woo ads widget. Will I still do this or use something different? I really am at a total loss.
    Thanks for any help you can give – so much appreciated.

    Phil

    (@owendevelopment)

    My guess is that the Woo Ads widget will appear on every page by default.

    You have two options:

    1. Use the plugin I sent you, replace the Woo Ads widget with it, paste the code I sent you into it and save. That ad will only appear on the homepage.

    2. If you want to continue using the Woo Ad widget, use another plugin called widget logic, install it, then in the widgets section where the Woo Ad plugin is (on the right), you’ll see a place to enter text for the widget logic, and add in there:

    is_home()

    Thread Starter skintinthecity

    (@skintinthecity)

    It worked Phil! I used your Option 2 suggestion. Thank you so very very much.

    Phil

    (@owendevelopment)

    No problemo. ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Want to show ad on home page only’ is closed to new replies.