Multiple Custom Taxonomy Dropdowns Lists

The “dropdown” element declared and used in each of these functions is the same, so the last one is overriding all previous. Specifying different terms each time fixes the problem: var writerdropdown = document.getElementById(“writers”); function onWriterChange() { if ( writerdropdown.options[writerdropdown.selectedIndex].value != -1 ) { location.href = “<?php echo home_url();?>/writer/”+writerdropdown.options[writerdropdown.selectedIndex].value+”/”; } } writerdropdown.onchange = onWriterChange; var … Read more

Extend the twentyten dropdown menu with jQuery with a delay onmouseout

The solution was very simple! Just use Superfish.js as instructed on http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started Be sure to include superfish, hoverIntent and jQuery in your wordpress. In your custom js script file, something like this works like a charm: $(‘ul#theidofyourmenu’).superfish({ delay: 600, // This will fire up the hoverIntent autoArrows: false // Disable this if you don’t want … Read more

pages meta box – get_categories dropdown

if you are using it in a metabox then you really don’t need this part: onchange=”document.location.href=this.options[this.selectedIndex].value;” So change the select fields to: <select name=”event-dropdown”> <option value=””><?php echo esc_attr(__(‘Select Event’)); ?></option> <?php //get saved data $saved_cat = get_post_meta($post_id,’event-dropdown’,true); $categories= get_categories(‘child_of=10’); $select_options=””; foreach ($categories as $category) { $option = ‘<option value=”‘.$category->cat_ID.'”>’; $option .= $category->cat_name; $option .= ‘</option>’; … Read more

Using wp_dropdown_categories in widget options

I got it 🙂 thanks to this function update( $new_instance, $old_instance ) { $instance = $old_instance; //Strip tags from title and name to remove HTML $instance[‘title’] = strip_tags( $new_instance[‘title’] ); $instance[‘kwtax’] = strip_tags( $new_instance[‘kwtax’] ); return $instance; } function form( $instance ) { //Set up some default widget settings. $defaults = array( ‘title’ => __(‘Equipment … Read more

Form to post new post with custom taxonomies

Update your form to include the term-id, instead of just <input type=”checkbox” /> use <input type=”checkbox” name=”taxonomy_id[]” value=”‘. $industryterm->term_id .'” />. That way you are actually sending along some values, in this case the term id. And in the args for wp_insert_post() make sure to include something like this: ‘tax_input’ => array( ‘industries’ => $_REQUEST[‘taxonomy_id’] … Read more

Trying to get variables in hacked category dropdown

The dot . in your code is evaluated as string litral, and not concatenation. Meaning if $inpCnt was equal to 5 for example, php will search for name=”scrape[“.5.’][sponsors]’ id= and will fail to find it. You can either remove the dots while still using the double quotes: $sponsors = str_replace( “name=”scrape[“$inpCnt’][sponsors]’ id=”, “name=”scrape[“$inpCnt’][sponsors][]’ multiple=”multiple” size=”19″ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)