Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $terms = wp_dropdown_categories(array(
- 'taxonomy' => 'news-categories',
- 'hierarchical' => 1,
- 'show_option_none' => "CATEGORIES",
- 'option_none_value' => "",
- 'name' => 'news_cat_name',
- 'id' => 'cat_search',
- 'value_field' => 'slug',
- 'selected' => 1,
- ));
- $('#cat_search').change(function () {
- var dropdown = $('#cat_search');
- if ($(this).val()) {
- window.location = "<?php echo esc_url(home_url('/')); ?>news-categories/" + $(this).val();
- }
- });
Add Comment
Please, Sign In to add comment