Disable Footer 1 and 2 on mobile and tablets

Posted in: Newspaper
Post count: 317

Hi

I would like to disable the Footer 1 and 2 on mobile and tablets but show it on desktop only. If its not possible, I want to show the footer at the bottom (copyright one) on mobile and tablet.

Please help.

Thanks

Post count: 388

I do find the copyright one works on mobile and tablet (at least, mine does).

One way to disable the widgets, although it’s just lazily hiding it, is this:

1. Install https://wordpress.org/plugins/zigwidgetclass/

2. Give all the widgets in the footers you don’t want a class like hide_on_mobile

3. Go to Theme Panel -> Custom CSS and create a class like this:


@media (max-width: 1018px) {
  .hide_on_mobile {
    display: none !important;
  }
}

@media (min-width: 1019px) {
  .hide_on_mobile {
    display: initial !important;
  }
}

Note that you may have to use a different number of px to pick out the exact screen sizes you want. If I remember right, the other breaks used in the theme are 1200, 768, and 480.

Post count: 317

Thanks but I know that already
But it shows a blank white space if I use “display: none”?

Post count: 6600

Hi,

It would be easier to hide the sub footer on desktop, you can use custom css to hide it only on desktop:

@media (min-width: 1200px) {
.td-sub-footer-wrap {
display: none;
}
}

Hope this helps!
Thanks

Post count: 388

@mehedi agreed that it’s not ideal, but I thought since on mobile and tablets the footer gets vertically stacked, is there much whitespace to worry about from the empty columns? If so you could maybe use nth-child to hide those columns altogether:

@media (max-width: 1018px) {
  .td-footer-wrap .wpb_row > div:nth-child(1), .td-footer-wrap .wpb_row > div:nth-child(2) {
    display: none !important;
  }
}

Does that work for you or still too much whitespace?

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.