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. ACF shortcode for project page

ACF shortcode for project page

Scheduled Pinned Locked Moved General Discussion
7 Posts 2 Posters 108 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.
  • M Offline
    M Offline
    mcerny
    wrote on last edited by
    #1

    Hi all,

    I'm creating a portfolio page with LayTheme. I have the ACF Wordpress plugin installed.
    I'd like to add fields to each project to easily enter info to be put in the right spot on the website.

    However, when using the Shortcode option the LayGridder, and I use the ACF function (acf field="project_type"), it only shows the function text itself and not the value I've put in for the field.

    Is this expected behaviour or is there a workaround? I found two posts on this forum regarding ACF and shortcodes, but they weren't tackling my problem..

    Thanks for any help!

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

      you mean a shortcode like

      [acf field="project_type"]

      ?

      and do you use www.laytheme.com
      or do you use www.laygridder.com

      if you use lay theme.
      can u go to lay options
      enable this setting, (at the bottom)
      Screenshot 2025-02-12 at 16.28.12.png

      does that change anything?

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

        Here:
        https://www.advancedcustomfields.com/resources/shortcode/

        It says
        "From ACF 6.3.0, the ACF shortcode is disabled by default for new installs of ACF. If you need to enable it, see enabling the ACF shortcode."

        It seems that you have to enable it first for the ACF plugin:
        https://www.advancedcustomfields.com/resources/shortcode/#enabling

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

          If you use www.laygridder.com
          You can create your own elements for the gridder with CMB2. If you do, you will even get "+MyElement" buttons in the gridder UI to add your own element.
          And in the modal you can have fields like text inputs and more that you can use to create your element on the Frontend and your element in the preview inside the Gridder.

          You can see how to do it here, with an example code:

          https://laygridder.com/documentation.html#custom-element-type

          Its a little complicated though

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mcerny
            wrote on last edited by
            #5

            Hi Armin,

            thanks so much for the reply and help.
            I'm using LayTheme and also found the ACF documentation. Will try to enable it and see what happens. Currently the website is moving server so won't get to it until next week.

            If it proves too difficult, might switch to LayGridder and use CMB2 with the help of a developer.
            Am I understanding correctly, that LayGridder gives the option of creating templates? Can LayGridder then be used together with LayTheme?

            Many thanks!

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

              Can LayGridder then be used together with LayTheme?

              no

              Am I understanding correctly, that LayGridder gives the option of creating templates?

              it gives you the ability to create your own custom elements that you can add to the gridder

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

                it gives you the ability to create your own custom elements that you can add to the gridder

                here: https://laygridder.com/documentation.html#custom-element-type
                its a little difficult cause there is some coding involved

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