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

by Josh Mallard · github.com/beardedginger/posts-cpt-select-field · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/beardedginger/posts-cpt-select-field/archive/refs/heads/master.zip

Readme

Posts and CPT Select Field

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"

Read the full README on GitHub →