• I am having issues with some code modification within User Submitted Posts Plugin.

    When the form is displayed using the code below:

    <li class="usp_category">
    				<label for="user-submitted-category" class="usp_label"><?php _e('Post Category'); ?></label>
    				<div>
    					<select class="usp_select" name="user-submitted-category" id="user-submitted-category">
    
    						<?php foreach($settings['categories'] as $categoryId) { $category = get_category($categoryId); if(!$category) { continue; } ?>
    						<option class="usp_option" value="<?php echo $categoryId; ?>"><?php $category = get_category($categoryId); echo htmlentities($category->name); ?></option>
    						<?php } ?>
    					</select>
    				</div>
    			</li>

    It displays the category list in the order that the categories have been added to the WP install / DB.

    I wish for them to be ordered in the normal way like below:

    Cars
    – BMW
    – Ford
    – ETC

    Bands
    – Muse
    – Kings of Leon

    How can I get this to appear in the drop down menu ready for submitting.

  • The topic ‘User Submitted Posts display category list’ is closed to new replies.