Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    (urgent) Mobile: hide site title on every news page

    General Discussion
    3
    5
    31
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fiona_oehler last edited by

      Hello,

      I wonder how it is possible in the mobile version (CSS) to hide the page title on each individual news page automatically (but not on the general news page).

      Example:
      www.test.de/news/news1
      www.test.de/news/news2
      www.test.de/news/news3
      In this case I would want to hide it on news1, news2 and news3 (= automatically on everything that comes after "www.test.de/news/")

      On the contact page I hide the page title as well and solved it this way:

      body.slug-contact .mobile-title,
      body.slug-contact .navbar,
      body.slug-contact .burger {
      display: none !important;
      }
      body.slug-contact{
      padding-top: 0;
      }

      … but I don’t know how to address "everything that comes after "www.test.de/news/" in CSS.

      I would be so happy if somebody knew!

      Thanks in advance!
      Fiona

      A 1 Reply Last reply Reply Quote 0
      • A
        alasdair17 @fiona_oehler last edited by

        @fiona_oehler hey Fiona, you need to use the permalink of your news post so for example if your news post is:

        www.test.de/news/my-news-article

        the code will need to be:

        body.slug-my-news-article .mobile-title,
        body.slug-my-news-article .navbar,
        body.slug-my-news-article .burger {
        display: none !important;
        }
        body.slug-my-news-article{
        padding-top: 0;
        }

        Hope that helps :)

        F 1 Reply Last reply Reply Quote 0
        • F
          fiona_oehler @alasdair17 last edited by

          @alasdair17 Thanks so much for your help!

          The only problem in this case would be that I (or my client) would have to make CSS changes for every single added news article, right? So I'm wondering if it's possible to set this to work automatically for all news-posts as well.

          Best
          Fiona

          A 1 Reply Last reply Reply Quote 0
          • A
            alasdair17 @fiona_oehler last edited by

            @fiona_oehler you're welcome :)

            Yeah I see what you mean, I'm not sure about it being done automatically at the moment, perhaps it's possible via javascript but that's a bit advanced for me!

            If you pasted out a few copies of this code in the CSS panel and gave instructions to your client I'm sure they wouldn't mind as all they need to do is change the title in the code.

            1 Reply Last reply Reply Quote 1
            • arminunruh
              arminunruh Global Moderator last edited by

              do this instead:

              body.type-lay_news .mobile-title,
              body.type-lay_news .navbar,
              body.type-lay_news .burger {
              display: none !important;
              }
              body.type-lay_news{
              padding-top: 0;
              }

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Post a link to where the problem is if possible, please <3
              I don't answer or check forum DMs, please just post on the forum.
              Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com

              Before you post:

              Use the Search Feature. Maybe there is already a solution to your issue.

              1. Update Lay Theme and all Lay Theme Addons
              2. Disable all Plugins
              3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
              4. When using a WordPress Cache plugin, disable it or clear your cache. Now see if your problem solved itself.
              Go here, see if your problem is listed here:
              Troubleshooting

              When you post:
              1. Post a link to where the problem is
              2. If the problem is difficult to explain, post screenshots / link to a video to explain it

              Thanks!

              Online Users

              O

              Recent Topics

              • Search as icon instead of text?

              • FILTER Categories showing all projects

              • H

                Vimeo embed with autoplay and loop is really slow...help!

              • A

                website not loading on iphone safari

              laytheme.com