I don’t know if you’re looking for information or solution but this post might help you, especially the “Building a custom post meta box” section.
The callback function is actually what you need. In this callback you need to run a loop that get posts from your Custom Post Type Demos
and populate it into a HTML select
element with specific values.
Related Posts:
- Using meta_query, how can i filter by a custom field and order by another one?
- meta_query for keys that aren’t yet set
- WP_Query orderby custom field then post_date in one query
- Filtering a WP_Query meta_query by numeric values isn’t working
- Querying custom post type with 2 custom fields (date-range)
- How Can I save multiple records in same meta key?
- order by meta_value serialized array
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- How loop through posts based on custom fields
- Display custom post types with custom date field value (before today) & order by custom date field
- Filtering by Post Meta Custom Fields – Performance
- meta_query compare >= not working but
- WP_Query: include custom post type only with specific meta value
- Returning a list of custom post types excluding those without a specific meta_value
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- wp_query check if integer exists in custom field’s array
- Filtering custom post type on a combination of custom taxonomies and custom fields?
- Meta Query Not Returning Output Despite Having Matching Values
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- Meta Query posts not showing on ending date of custom field
- How to Output which matched meta_keys were found from custom_type_posts?
- Possible to filter custom post type with multiple meta data?
- filter search custom field query
- How to let users choose where to search for posts?
- Query based on custom fields start and end date
- Getting a custom post’s custom field based on another custom post’s custom field select
- Custom Query: If One Post Object Field Value Is The Same As Another
- order the meta query results by 2 custom fields
- Using OR relation in meta_query to check for a value before sorting by another
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- Meta query and compare “!=” not working as expected
- Orderby if between two meta fields
- Show posts from WP Custom Post Type selected from a field in a metabox
- meta query multiple values for the same key
- Sort custom post archives by a meta value from a different custom post type?
- Custom post types – meta_query: search lesson which starts sooner
- Meta_Query refuses to return results
- Sort loop by custom field from different post type
- Meta_query by date for Events archive
- Query events post type after current date and timezone
- Selecting posts older than the current Unix epoch timestamp
- Unable to get the upcoming events for custom post
- WP_Query arguments: Loop through custom post type – get all entries except excluded meta_key?
- loop through custom post-type with two meta_keys
- Querying meta values within an array
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Get Posts ordered by a date custom meta field
- Check for custom field value in different post type than current one and do something
- Function to Compare CPT Post Custom Value with Default Posts CF Value
- Hide custom post type field from author?
- echo value from ‘select’ field type into page template using cmb2?
- wordpress plugin error handling
- Creating Photo Gallery System with Custom Post Type
- Trying to save custom post type from frontend partially working
- Is there any performance consideration when using Custom Post Types?
- Filter posts with meta_query NOT IN where value has multiple values
- Custom Post Type Navigation on Custom Field
- Automatically update custom field in all posts of a custom post type
- Filter custom posts using auto populated dropdown selectors
- Add custom field to Posts and sort by it
- Including metaboxes from custom post types in global search — continued
- Show image gallery from a custom field
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- How can I add a custom field to an existing custom post type?
- Display Repeatable Meta Box Content
- WP_Query orderby not work with meta_key
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- Custom Field not saving in WordPress
- Reusable metabox backend and frontend
- How to display wp_post by custom field value?
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- How to import database table as custom post type and custom fields?
- Custom Taxonomy dont save in a frontend form for post a custom post
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- Fill custom fields when saving custom post types
- Should i use custom post type for a custom footer?
- Use Gravity Forms and a Shopping Cart for output to Freshbooks for an Estimate [closed]
- Migrate Custom Post Type with Custom Fields data and parent child order
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- Display Custom Field or Custom Taxonomy in front page /post/product
- How to select meta key in custom database query
- PHP Warning with Custom Fields
- Custom post types & Pages hierarchy – Error 404
- filter rest api post by a acf filed
- How to prepend text to custom field value A, but only if custom field value B matches a certain string?
- How do I extract the contents of a CPT’s custom field for all posts?
- How to delete comma from the end of results? [closed]
- Publish post and create additional posts with same content
- Creating multiple CPT posts from one Gravity form
- Events with multiple event dates + permalink for each date
- Function not pulling image or text from custom post type
- Custom field totals
- Types plugin isn’t compatible with my custom post type
- Show Posts in Vertical Tabs with Scrollbar
- How do I filter a custom post type loop by a field?
- Display ACF object field data using Elementor Custom Query
- Sortable admin columns ordering from custom fields isn’t combine com search and Dropdown filter
- WordPress custom field sorting, weird behavior: the latest post is at the end
- I want to understand plugin implementation of custom posts / taxonomies / metaboxes