WP Manifestindependent plugin directory
manifest / developer / posts-cpt-select-field

Posts and CPT Select Field

Create a select field of entries from posts, pages, or any combination of custom post types

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/beardedginger/posts-cpt-select-field/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Create a select field with entries from posts, pages, or any custom post type as options for the field.

LimeCuda for Fewer Than Three

Usage

<?php lc_posts_as_options( $post_type, $field, $value ); ?>

Parameters

$post_type

array

The post types that you would like to pull posts from as options for the select field

default: 'post'

$field

string

The field ID for the select field

$value

int

The post ID for the saved value of the field

Available Filters

lc_cpt_select_query_args

Filter the default WP_Query args to completely control which posts are returned as options for your select field.

lc_cpt_defaultoption' . $field

Filter the default option label for the field. defaults to "Select"