WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Hide page on mobile theme (4 posts)

  1. inhouse
    Member
    Posted 3 years ago #

    Hi, I've tried to hide my gallery page when a visitor is using the mobile theme but to no avail. I am using Firebug to see that the gallery page is "page_item page-item-61" so my CSS in the style.css file in that theme folder looks like this: .page_item page-item-61 {display:none!important;} I tried .page_item and was able to hide all the pages but adding the specific page item doesn't work. I tried #page_item, and that didn't work either. I tried everything I could think of. Can anyone help? The site is m.poshhairgeneva.com . Thanks in advance!

  2. inhouse
    Member
    Posted 3 years ago #

    This seems pretty basic. It boils down to the fact that I need to "display: none" a specific page item (a page link) on my mobile style.css file. I was able to hide the entire navbar but when I tried to narrow it down to only one of the page links, I am unsuccessful. Can anyone help?

  3. Mike Thone
    Member
    Posted 3 years ago #

    I took a look at your mobile page with firebug and I was able to get the gallery link to disappear using display:none; when I edited the element.style (adds inline styling).

    I did this first, then I read your post again. I think I know what you're doing wrong. Your list item has (2) different classes in it: page_item, and page-item-61. Whenever there's a space between words in the class attribute that means there's more than one class. To make just the gallery link disappear you need to write:

    .page-item-61 {display:none;}

    That should work.

  4. inhouse
    Member
    Posted 3 years ago #

    Right on Mike, that worked perfectly when I placed that in the style_structure.css file in the mobile theme. I could swear I had tried that exact class but whatever works, I'm happy. You're the best, man.

Topic Closed

This topic has been closed to new replies.

About this Topic