我目前正在尝试将一个超级菜单集成到我的wordpress主题中,但它似乎正在消失。我相信我已经正确地编码了js和css。。。谁能告诉我出了什么事?或者如何集成到功能中。php
FURTHER UPDATE*
好啊所以我把函数放回了标题中。php如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php bloginfo(\'name\'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<meta name="keywords" content="Holiday, free CSS template, clean, neat, aqua, white, templatemo" />
<meta name="description" content="Holiday is a clean and neat free CSS template using aqua and white colors." />
<link rel="stylesheet" href="<?php bloginfo(\'stylesheet_url\'); ?>" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> </script>
<script type="text/javascript" charset="utf-8"></script>
<?php function my_theme_scripts() {
wp_register_script( \'jquery\' );
wp_enqueue_script( \'superfish\', \'js/superfish.js\', array( \'jquery\' ) );
}
add_action(\'init\', \'my_theme_scripts\');
?>
<script>
$(document).ready(function(){
$("ul.sf-menu").superfish();
});
</script>
<?php wp_nav_menu( array( \'theme_location\' => \'primary\', \'menu_class\' => \'sf-menu\', ) ); ?>