In wordpress I have have a custom post type. Lets say it is movies. Inside movies I have a list of posts with different movie name. Now in each post I want a custom field of dropdown. Where all the posts for movie will be get populated. And when I will select anyone of them and save. Then the selected movie will show in the frontend. So can someone tell me how to add custom fields for dropdown and fetch all the posts name from that category in the options? Any help will be really appreciable. Thanks


In your theme's function.php file find the register_post_type( 'movie', $args ); and in $args array, add a value 'custom-fields'. Now refresh your admin panel. A custom field drop down will be appear there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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