[post_select_field]

The shortcode designed to generate a post dropdown select field to navigate.


Product


Shortcode Attributes

There are a number of shortcode attributes available which you can use to customize the output.

  1. label – The label text displayed above the dropdown field.
    • Options: Any text value.
  2. placeholder – The placeholder text displayed in the dropdown field before a post is selected.
    • Default: Select Post.
    • Options: Any text value.
  3. categories – List of category IDs to filter posts by.
    • Options: Any numeric value. Use commas to separate.
  4. tags – List of tag IDs to filter posts by.
    • Options: Any numeric value. Use commas to separate.
  5. orderby – Specifies the criteria for ordering the posts.
    • Default: title.
    • Options: id, date, title, menu_order, rand. Specify one only.
  6. order – Specifies the order of the posts.
    • Default: asc.
    • Options: asc, desc. Specify one only.

Example Usage

[post_select_field]
[post_select_field label="Choose a Post" placeholder="Select a Post" categories="1,2" orderby="date" order="DESC"]
Example 1:
This example displays a dropdown list of posts with the placeholder “Select Post”.

Example 2:
This example displays an HTML dropdown field with the label “Choose a Post” and the placeholder “Select a Post”, showing posts from categories 1 and 2, ordered by date in descending order.