Tagged: 

Viewing 2 reply threads
  • Author
    Posts
    • #9219
      hasinhayder
      Member

      First, thanks for the beautiful plugin, it’s awesome.

      So I am interested to know how can I use piklist and create parts without placing a file in a specific-part folder. For example I want to create a metabox with two text fields (on the fly) but I don’t want to create a part file in the meta-boxes folder. Is there any hook/way to do this?

      Thanks in advance

    • #9223
      hasinhayder
      Member

      No One?

    • #9225
      Steve
      Keymaster

      You would have to use piklist_part_process to identify the area (e.g. metabox, term, setting, etc) you want to render.

      Wrap that logic around a piklist field call: https://github.com/piklist/piklist/blob/develop/add-ons/piklist-demos/parts/meta-boxes/field-text.php#L19-L28

      You can use piklist('field') in your functions.php file and it will render.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.