Add new header-right widget for 1 page only

Community Forums Forums Design Tips and Tricks Add new header-right widget for 1 page only

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  DannyM 1 year ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #76925

    DannyM
    Participant
    Post count: 17

    Hi,

    Could someone please point me in the right direction.

    I’m working on a website that has an image in the header-right widget area, the client would like a different image to appear in the header-right widget area for one page only and I’m not sure how to go about it.

    Should I create a new widget area (header-right2 for example) and then use a body class or am I on the wrong track?

    Any help very gratefully received!

    Warm Wishes

    Danny

    #76926

    Sridhar Katakam
    Participant
    Post count: 1071

    You could use a plugin like Widget Logic. For that one page (let’s say its slug is “about”), for the generic widget that should appear site-wide except this Page, you would put:

    !is_page('about')

    and for the widget that should appear only on that Page, you would use:

    is_page('about')


    #76927

    stinkykong
    Participant
    Post count: 176

    Body class method was the way I was thinking. However, there are other considerations such as, “does this image have a function such as a link or alt text?”.

    What I might do, is remove the current image but use CSS to add it as a background, then using the custom body tag, write a CSS rules that puts a different background image in on your particular page.

    Now I see Sridhar’s option….may be good, also.


    Web Design by Websentia Web Services
    http://websentia.com

    • This reply was modified 1 year ago by  stinkykong.
    • This reply was modified 1 year ago by  stinkykong.
    #76994

    DannyM
    Participant
    Post count: 17

    Thank you both guys,

    I’d not heard of that plugin before – worked a treat, thank you very much!

    Warm Wishes

    Danny

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.