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. SVG and CSS based on current page

SVG and CSS based on current page

Scheduled Pinned Locked Moved General Discussion
6 Posts 3 Posters 860 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.
  • S Offline
    S Offline
    stdhd
    wrote on last edited by
    #1

    Hi Armin,

    I've read your documentation about http://laytheme.com/documentation.html#css-based-on-current-page CSS based on current page.

    It works fine with site title text logo. Is there any solution for SVG logos as well? Maybe you know a solution?

    Thank you!

    1 Reply Last reply
    0
    • arminunruhA Online
      arminunruhA Online
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      Hey!
      What exactly do you want to do? Like have a svg logo for one page and another type of logo for another page?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stdhd
        wrote on last edited by stdhd
        #3

        Looking for a solution to change color of SVG logo on different pages.

        Example:


        PAGE 1

        .sitetitle img svg
        {
        fill: #green;
        }


        PAGE 2

        .id-123 .sitetitle img svg
        {
        fill: #red;
        }


        Is this possible?

        1 Reply Last reply
        0
        • arminunruhA Online
          arminunruhA Online
          arminunruh
          Global Moderator
          wrote on last edited by
          #4

          ah
          So you want to change the color of the svg. This is not easily possible. Lay theme uses this markup for showing an svg image:
          <img src="http://laytheme.dev/wp-content/uploads/2016/10/Bugger_King_Logo.svg" alt="Lay  Theme">

          If you open the svg with a texteditor you see the svg's markup which looks just a bit like HTML markup. If you copy that markup into "Custom HTML at top" (in "Custom html and css") you will have the svg markup directly in your website. Of course this is not the site title and you would need to position this svg by yourself using css. Example:

          .your-svgs-class{
          position: fixed;
          top: 10px;
          left: 50%;
          transform: translateX(-50%);
          z-index: 2;
          }
          

          Now that you got your svg markup in your website you can do things like:

          svg path{
          fill: blue!important;
          }
          

          Here's more info on css and svg
          https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/SVG_and_CSS

          1 Reply Last reply
          -1
          • W Offline
            W Offline
            Wynz
            wrote on last edited by
            #5

            Hey Armin,
            is there a better way now for this problem? Would love to change the color of my title SVG on a specific site.

            1 Reply Last reply
            0
            • arminunruhA Online
              arminunruhA Online
              arminunruh
              Global Moderator
              wrote on last edited by
              #6

              Hey, SVG colors can only be changed if you insert the SVG code into your website and style the SVG with CSS. It's not possible if you just insert the SVG as an image tag like <img src=

              This is just a general HTML and SVG restriction. It's nothing to do with Lay Theme specifically.

              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
              arminunruhA
              arminunruh
              G
              Glyph
              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