1

This is what I'm trying to accomplish, I have a custom post type of "demos", from here I can add custom CSS/HTML/JS to display a demonstration (online preview) of what it is I have designed/coded. (This part works great)

First I go in and create the demo and publish it, then I create a new post about the element I have designed/coded and add details through custom fields such as Name, Browser Compatibility, Framework, Files Included, etc.

On this page I display the tutorial and details about the element and also provide 2 buttons, "Download" & "Live Demo". I am able to use the "Download" button linked to the attached file just fine (this works).

Buttons

Right now I am using a blank textbox for the "Live Demo" this is where I type in the Live Demo URL which links within the post to the Demo. What I want to do is be able to just select the Demo Post Title through a SelectBox instead of typing the URL in. Meta Box that retrieves Last 5 Posts from Custom Post Type Demos?

Like this:

Meta Box

How would I do this?

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.