• I’m working on modifying the Twenty Eleven theme and I’d like to replace the search form that’s in the header with a div that displays either an ad or a static graphic (depending on what page is being visited). For example, I’d like to have an ad on the homepage in place of the search form, but on, say, the store page, I’d like a graphic that just says “online store”. Is this something that’s possible?

    Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • should be possible –

    where are you stuck?

    have you created a child theme of twenty eleven?

    can you locate the code of the search form in header.php?

    are you familiar with the html image tag and link tag and the corresponding css?

    are you familiar with the wordpress conditional tags?
    https://codex.www.ads-software.com/Conditional_Tags

    Thread Starter timhookoo

    (@timhookoo)

    I’m stuck more or less on just knowing what’s possible. It seems like the header.php file is consistent throughout the site (I don’t think I could make more than one header.php file).

    I have indeed crafted a child theme out of twenty eleven.

    I did find the search form in header.php

    I would need to build the html/css div tag, although I do have a mockup of what I’m trying to do in static html.

    I’m not familiar with conditional tags. I’ve seen a few tutorials on them but I don’t have a firm grasp on them by any means. I’m pretty much a newbie to wordpress.

    I don’t think I could make more than one header.php file

    Yes, you can. See https://codex.www.ads-software.com/Function_Reference/get_header

    Thread Starter timhookoo

    (@timhookoo)

    Ah…well that opens up a lot of possibilities. Is widgetizing a section of a site difficult? I figure I could make the new area of the header able to accepts widgets, then I could use a dynamic ad widget in that area.

    Is widgetizing a section of a site difficult?

    Nope. It’s exactly the same as widgetizing a sidebar except you call the new “sidebar” some place else – such as within header.php. I’ve got a widget-ready area in the header of the Emporium theme if you want to download that and see how it can be done.

    Thread Starter timhookoo

    (@timhookoo)

    Very cool – I’ll check it out!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding custom advertisement area in modified Twenty Eleven theme’ is closed to new replies.