wp_dropdown_categories() searching is not working with CPT, please review my code

Working drop down in search for CPT <?php $categories = get_categories(‘taxonomy=custom-tax’); $select = “<select name=”cat” id=’cat’ class=”postform”>n”; $select.= “<option value=”-1″>Select category</option>n”; foreach($categories as $category){ if($category->count > 0){ $select.= “<option value=””.$category->slug.””>”.$category->name.”</option>”; } } $select.= “</select>”; echo $select; ?> <script type=”text/javascript”><!– var dropdown = document.getElementById(“cat”); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value != -1 ) { location.href = … Read more

Bulk edit for custom taxonomy

What you are looking for is custom taxonomy (which has been mentioned in the comments). Which you create with the register_taxonomy() function. There is a beginners guide here if you need it. You will need to pass in an array of arguments. The most important is probably hierarchical which is true for something like categories, … Read more

How to alter query so that image changes in order every time page is refreshed

Your code is functional, however, it has several major flaws: query_posts query_posts and wp_reset_query are used, I would recommend never using this function, it has major problems, and encourages bad habits. if you want to modify the posts pulled in by WordPress, use the pre_get_posts filter, don’t replace the main query with a second and … Read more