wordpress submit contact form submit to jquery

<script type="text/javascript">
$(function(){
           var templateDir = "<?php bloginfo('template_directory') ?>";
           var file="/contact.php";
                    $("#ContactForm").validate({
          submitHandler: function(form) {
           $.post(''+templateDir+file, $(form).serialize(), function(data)
            {
            alert(data);
            $("#ContactForm").find("input[type=text], textarea").val("");
            });   
          }
      });
   
});                  
</script>

how can use shortcode in theme on wordpress

<?php echo do_shortcode("[example_shortcode]"); ?>

menu walker dropdown wordpress function

use to template

wp_nav_menu(array( 'theme_location' => 'primary', // your theme location here 'walker' => new Walker_Nav_Menu_Dropdown(), 'items_wrap' => '', ));

function to add

class Walker_Nav_Menu_Dropdown extends Walker_Nav_Menu{ // don't output children opening tag (`
    `) public function start_lvl(&$output, $depth){} // don't output children closing tag public function end_lvl(&$output, $depth){} public function start_el(&$output, $item, $depth, $args){ // add spacing to the title based on the current depth $item->title = str_repeat(" ", $depth * 4) . $item->title; // call the prototype and replace the
  • tag // from the generated markup... parent::start_el(&$output, $item, $depth, $args); $output = str_replace('
  • with the closing option tag public function end_el(&$output, $item, $depth){ $output .= "
\n"; } }