Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Steve 6 months, 3 weeks ago.

  • Author
    Posts
  • #9219

    hasinhayder
    Participant

    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
    Participant

    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.

You must be logged in to reply to this topic.