Site logo

Archived topic

top bar different on one page

3 replies · Started by BeeLady11 on March 29, 2019

Viewing posts 1–4 of 4

Hi
I have a site with a top bar I am happy with.
I would like a different top bar on just one page. I have searched forums, etc. but none of them really cover this.
I have even been into the new Elements option on GP but I just cannot see how to do it.
It's the /guildford-locksmith/ page I would like the different header on (as he has different contact details to his boss)

Any help would be appreciated.

Thanks

Hi there,

as theres only two numbers may be easier to just include both of them in the same widget and then use some CSS to hide them accordingly.

So edit the widget with the phone numbers and just add the two numbers like so:

<a style="vertical-align:top;" class="main-phone" href="tel:0000000000"> 00000 000 000 /a>
<a style="vertical-align:top;" class="guildford-phone" href="tel:11111111111"> 11111 111 111</a>

Then this CSS - should hide guildford on all other pages, and the main number on the guilford page:

body:not(.page-id-310) .guildford-phone {
    display: none;
}
.page-id-310 .main-phone {
    display: none;
}

That worked beautifully!
Thankyou so much
A :)

Awesome - glad to be of help

This archived topic is closed to new replies.