Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. (urgent) Mobile: hide site title on every news page

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

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 104 Views
  • 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 Offline
    F Offline
    fiona_oehler
    wrote on last edited by
    #1

    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
    0
    • F fiona_oehler

      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 Offline
      A Offline
      alasdair17
      wrote on last edited by
      #2

      @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
      0
      • A alasdair17

        @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 Offline
        F Offline
        fiona_oehler
        wrote on last edited by
        #3

        @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
        0
        • F fiona_oehler

          @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 Offline
          A Offline
          alasdair17
          wrote on last edited by
          #4

          @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
          1
          • arminunruhA Offline
            arminunruhA Offline
            arminunruh
            Global Moderator
            wrote on last edited by
            #5

            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
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            I also code custom websites or custom Lay features.
            💿 Email me here: 💿
            info@laytheme.com

            Before you post:
            1. When using a WordPress Cache plugin, disable it or clear your cache.
            2. Update Lay Theme and all Lay Theme Addons
            3. Disable all Plugins
            4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

            This often solves issues you might run into

            When you post:
            1. Post a link to where the problem is
            2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
            3. If the problem is difficult to explain, post screenshots / link to a video to explain it
            Online Users
            P
            paul.bowler
            Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
            laytheme.com
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Search