GitHub Download

Posts dropdown

The posts dropdown can be used for a situations where you want to allow users of your theme to use a specific relation to the given post.

It can be used e.g. to specify privacy policy page:

     "name": "privacyPolicyPage",
     "label": "Privacy Policy",
     "group": "GDPR",
     "value": "",
     "allowedPostStatus": ["any"],
     "type": "posts-dropdown",
"multiple": false }
Posts dropdown list

The posts dropdown returns the ID of the selected post as a value so it should be connected with use of the getPost helper. If the multiple option is set to true, then string with IDs separated by comma is returned.

The allowedPostStatus parameter allows the following values:

  • any
  • draft
  • hidden
  • featured
  • published

The any value means any other post status so there is no need to specify any other statuses in the array with post statuses values.


Get the latest Publii news, updates and more delivered directly to your email inbox

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at By clicking below, you agree that we may process your information in accordance with our Privacy Policy.