Select category for post in a custom publishing post page
-
Hello,
I created a page in wp admin to quickly publish videos, but i need to select a video category for that video and this is what i did so far but it doesnt work for me. I hope somebody can help me.$my_post['post_category'] = $video_category; <select name="video_category" class="widefat mid"> <option value="video_category">Select Category...</option> <?php $categories= get_categories(''); foreach ($categories as $videocategory) { $video_category = '<option value="/category/archives/'.$videocategory->category_nicename.'">'; $video_category .= $videocategory->cat_name; $video_category .= selected($videocategory, $_POST['video_category']); $video_category .= '</option>'; print ucfirst($video_category); } ?> </select>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Select category for post in a custom publishing post page’ is closed to new replies.