Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • 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. How to Add and format [Shortcodes] in text fields

How to Add and format [Shortcodes] in text fields

Scheduled Pinned Locked Moved General Discussion
8 Posts 2 Posters 500 Views 2 Watching
  • 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
    daskombinat
    wrote on last edited by
    #1

    Hello here!

    It seems that they can just add shortcodes in Lay Theme as a separate element trough +more + shortcode, right? For some reasons I also can't put a shortcode element between two text elements. The shortcode always appears at the bottom of the site below the both text elements.

    • Is there a possibility to ad shortcodes kind of inline in text?
    • If I created a shortcode via +more + shortcode how I can format it then (color, style, etc.)?!

    Best!

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

      Hey there, so styling short codes: it really depends on what the short code delivers. A short code can produce all kinds of things. That is defined by the plugin author who provides the short code. If you want to style the output of a short code, it has to be done in the plugin settings or the plugin authoor needs to help you with that, not me.

      Short codes in text: I mean, you could try to enable "content filter" In Lay Options. In lay options, just search for those words, and you will see the setting.

      This should make it possible to have shortcodes in text elements too.

      About short codes between two text elements, this, I think, really depends on the shortcode itself. Without a URL to where you have the issue, I can't really inspect and see what's going on, so if you could post a URL, that would be great.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        daskombinat
        wrote on last edited by
        #3

        Hi, Arnim!
        Thank you for your answer. At the moment our homepage is not online. Ill try this "content filter" feature for first.
        Best!

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

          With "Content filter" option activated, the [shortcode] is displayed in the text also. Unfortunately I cant format it and don't follow the formatting of the text (is black on black background) :

          HTML- Example:
          Sie können Ihre Cookie-Einstellungen jederzeit über den Consent-Link hier <span style="color: #ffffff;">[revoke_consent text="Hier können Sie Ihre Zustimmung zu Cookies widerrufen."]</span> oder am Ende dieser Seite anpassen oder Ihre Zustimmung widerrufen.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            daskombinat
            wrote on last edited by
            #5

            The Plugin "Cookie Consent" generate following HTML <a href="#" class="cncb-js-restore">Hier können Sie Ihre Zustimmung zu Cookies widerrufen.</a> from the shortcode [revoke_consent text="Hier können Sie Ihre Zustimmung zu Cookies widerrufen."].

            (As already said) With content filter we can put the shortcode in the text, we can also change some stlying like background-color (for some reason not text) via custom CSS oh the consent plugin or in the WP customizer.

            a.cncb-js-restore {
            color: #ffffff;
            background-color: #f7eb5b;
            }

            But it also went out that the shortcode is displayed, but it have no functionality no mater if "Smart Loading for HTML- und Shortcode-Elemente" activated or not.

            In the end we pasted a result of the shortcode instead of the shortcode itself in the page, also <a href="#" class="cncb-js-restore">Hier können Sie Ihre Zustimmung zu Cookies widerrufen.</a> So it works now like this, although the text is still black, it is legible thanks to a different CI background colour for it now.

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

              okay, well, it is a cookie plugin, right? It should have a setting to just show the cookie banner on your website without you having to insert a shortcode

              I think that is how most cookie plugins work.

              Also, I'm not even sure if that makes sense to put it into a short quote on one page, because I think the cookie banner needs to appear on every page on first visit.

              Maybe it's better to use a different cookie plugin.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                daskombinat
                wrote last edited by
                #7

                Yepp, the cookie plugins works also without the short-code just fine. But the link to reset the cookie settings is generated via short-code.

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

                  ok please send all the info to info@laytheme.com
                  where the page is, your admin login of wp-admin
                  a link to this topic

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  We also code custom websites or bespoke Lay features. Drop me a line at info@laytheme.com or check out my work at arminunruh.com.

                  Want to support my work? paypal.me/arminunruh

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