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. Change fonts in accordeon CSS

Change fonts in accordeon CSS

Scheduled Pinned Locked Moved General Discussion
6 Posts 2 Posters 59 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.
  • D Offline
    D Offline
    dennisbern
    wrote on last edited by
    #1

    Hi everyone

    I want to change the fonts in the accordeon CSS code that Amir wrote. Have I got it right I need to do this in this line?

    <div class="accordion-title lay-textformat-parent">.

    I have already created a font in the Wordpress "Text Formats". The HTML class is called _accordion_title.

    Can I use this HTML_Class or do I need to change the fonts somewhere else?

    All the best and thanks

    Dennis

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dennisbern
      wrote on last edited by dennisbern
      #2

      Does anyone know how to change fonts in Amir's accordion CSS code?

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

        i dont know which code you mean, do you have a link or can you post the code here

        if you can change the html code, you can just add class="_accordion_title" to some container or insert _accordion_title into an existing class attribute

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dennisbern
          wrote on last edited by
          #4

          Sure. I put this in the "Custom CSS & HTML" under Custom <head> content:

          <script>
          window.laytheme.on('newpageshown', function(){
          jQuery(".accordion-title").on("click", function(){
          jQuery(this.parentNode).toggleClass("active")
          })
          })
          </script>
          <style>
          .accordion-title{
          cursor: pointer;
          }
          .accordion .minus, .accordion .plus{
          margin-left: 30px;
          }
          .accordion .minus{
          display: none;
          }
          .accordion .accordion-content{
          display: none;
          margin-top: 20px;
          }
          .accordion.active .minus{
          display: inline;
          }
          .accordion.active .plus{
          display: none;
          }
          .accordion.active .accordion-content{
          display: block;
          }
          .accordion-title{
          display: inline-block;
          }
          </style>


          And this in a "Edit HTML" on a project site:

          <div class="accordion">
          <div class="accordion-title lay-textformat-parent">
          <span>Chris Leuenberger & Marcel Schwald</span>
          <span class="plus">+</span>
          <span class="minus">-</span>
          </div>

          <div class="accordion-content lay-textformat-parent">
              <p>Chris Leuenberger und Marcel Schwald haben s.....</p>
              <p><br><a href="https://www.marcelschwald.com/">www.marcelschwald.com</a><br><a href="https://chrisleuenbergerproductions.com">https://chrisleuenbergerproductions.com</a></p>
          </div>
          

          </div>

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

            <div class="accordion-title _accordion_title">

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dennisbern
              wrote on last edited by
              #6

              THX it worked.

              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
              M
              mactics
              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