Linux 软件免费装

Wordpress CSS Drop-down Menu

开发者 zackdesign
更新时间 2012年5月7日 13:08
捐献地址: 去捐款
PHP版本: 3.0 及以上
WordPress版本: 3.3.2

标签

widget plugin page css wordpress theme menu browser dropdown exclude child down drop friendly flyout superfish

下载

2.1.1 2.3.7 3.0.9 0.1 0.3 1.0 1.1 1.2 2.0 2.1 2.2 2.2.1 2.2.2 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.7.1 3.0.8 4 4.0.1 4.0.2 0.2

详情介绍:

Note: This plugin requires PHP 5 Warning: This plugin requires knowledge of CSS to use adequately in widgets Features at a glance: Theming options: If you want me to modify the CSS for you simply contact me and I will do it easily and quickly for you for a moderate sum. It uses Stu Nicholl's final drop-down code which is a complete CSS solution - no Javascript required!! You can look on Stu's site for other drop-down code as I got the flyout left and right code from there. Don't forget to donate if you're using his styles. Most of his CSS should work just fine with the menu. I've made it so that the plugin automatically finds menu.css in the plugin's folder and loads it in your Wordpress site so you can instantly see how it will look. If you want to create your own CSS simply create menu.css in your theme's root directory and the plugin will load that automatically for you. Please note that if you're upgrading you will need to change your theme files to suit the new approach. See Installation for further information.

安装:

<?php if (class_exists('CSSDropDownMenu')) { $myMenu = new CSSDropDownMenu(); /* Extra options here, like so: $myMenu->orientation="top"; */ $myMenu->show(); } ?> You can place the above code anywhere in your theme, not just the header. Options available to you are: $myMenu->orientation - Values are 'top', 'right', 'left' - default is 'top' $myMenu->name - Wordpress menu id, slug, or name $myMenu->container_class - the class that is applied to the container $myMenu->theme_location - The location in the theme to be used (defined via register_nav_menu) $myMenu->menu_class - CSS class to be used for the ul element which forms the menu These are a subset of the options given here: http://codex.wordpress.org/Function_Reference/wp_nav_menu If you want to show the widget in the header of your theme, add a sidebar to your header.php file and update your functions.php file to add a new sidebar there. PHP for your sidebar.php file in your Wordpress theme: <?php if ( function_exists ( dynamic_sidebar('menu') ) ) : dynamic_sidebar ('menu'); endif; ?> Example PHP for your functions file: <?php if ( function_exists ('register_sidebar')) { register_sidebar( array( 'name' => __('Menu', 'menu'), 'id' => 'menu', 'description' => __('Shows a dropdown menu in the header.', 'menu'), 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => '' ) ); } ?>

升级注意事项:

Please make sure to update your theme's header.php file if coming from versions older than 3.x, removing wp_css_dropdownmenu() and replacing it with: if (class_exists('CSSDropDownMenu')) { $myMenu = new CSSDropDownMenu(); /* Extra options here, like so: $myMenu->exclude_purl="1"; */ $myMenu->show(); }

常见问题:

It doesn't work with IE x

(Un)fortunately the Wordpress nav menu system doesn't use the browser hacks Stu Nicholl used. There are many other CSS navigation menus out there these days, do a quick Google search, pop it into your own menu.css file, and target the correct class. It's easy to drop over the top!

I Need HELP!!!

That's what I'm here for. I do Wordpress sites for many people in a professional capacity and can do the same for you. Check out www.zackdesign.biz

I'm getting strange class errors

You need PHP 5 to run this

Where's the dynamic width gone?

I left dynamic menu width code in until a replacement CSS menu can be found... it should not break existing dynamic CSS, but you can no longer change the options in the WP Settings. Contact me to suggest a good alternative, and if you need to change any of the options found in the css_dropdownmenu_css function use functions.php and this as a guide: http://codex.wordpress.org/Function_Reference/update_option

更新日志:

4.0.2 4.0.1 4.0 3.0.9 3.0.8 3.07.1 3.0.7 3.0.6 3.0.5 3.0.4 3.0.3 3.0.2 3.0.1 3.0 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.3 2.2.2 2.2.1 2.2 2.1 2.0 1.2 1.1 1.0 0.3 0.2 0.1