How to Wordpress K2 dropdown menu
Wordpress K2 is a amazing theme for Wordpress and much people wrote about it. I just want to bring some easy hacks for wordpress K2 here, like the dropdown menu for example.
Ok lets get startet… with Wordpress K2 dropdown menu!
For this Wordpress how to I use Wordpress K2 Release Candidate 3 and the bleeding edge dropdown from Simon Benjamins.
1. Replace or comment out the wordpress K2 navigation
You can find the navigation of wordpress k2 in the header.php:
[source:php]
<?php wp_list_pages(’sort_column=menu_order&depth=1&title_li=’); ?>
<?php wp_register(’<li class=”admintab”>’,'</li>’); ?>
[/source]
with …
[source:php]
//<?php wp_list_pages(’sort_column=menu_order&depth=1&title_li=’); ?>
//<?php wp_register(’<li class=”admintab”>’,'</li>’); ?>
<?php gdd_dropdown_menu(”); ?>[/source]
But please just put in under the closing DIV, like that:
[source:php]
</ul></div>
<!– dropdownmenu –>
<?php gdd_dropdown_menu(”); ?>
<hr />
[/source]
So how to fill the wordpress k2 dropdown menu?
Just write / edit a page and choose “pageparent” the main site where the new page should be.
Thats it. Now you habe wordpress k2 dropdown menu!
Update: Another possible (I do not check it out) dropdown menu for Wordpress K2 Theme is here.
Comments
22 Responses to “How to Wordpress K2 dropdown menu”
Leave a Reply

[...] How to Wordpress K2 dropdown menu | Webdesign professional K2を dropdown menu にするハック (tags: wordpress plugin menu hack) [...]
[...] 查看更多:http://www.webdesign-professional.eu/how-to-wordpress-k2-dropdown-menu.html [...]
a duplicate set of page menus appear in both IE and Firefox. In Firefox, the drop down menus work fine. In IE, they dont appear at all. can you please tell me how i can fix this problem?
i can provide additional information as needed. thanks!!
Have you cleared the cache of the IE?
Which IE-Version you use (I tested IE 6 and 7)?
Please check the site with Opera!
Deactivate all plugins and check again. Result?
–>
… Post the Php-Code of the Dropdown-inlcude (k2 header.php)
comment_status) or (’comment’ == $post-> comment_type) )) {
wp_enqueue_script(’k2comments’);
}
?>
<html xmlns=”http://www.w3.org/1999/xhtml” >
<meta http-equiv=”Content-Type” content=”; charset=” />
<meta name=”generator” content=”WordPress ” />
<meta name=”template” content=”K2 ” />
<meta name=”description” content=”" />
<link rel=”stylesheet” type=”text/css” media=”screen” href=”" />
<link rel=”stylesheet” type=”text/css” media=”screen” href=”/css/rollingarchives.css” />
<link rel=”stylesheet” type=”text/css” media=”screen” href=”" />
<link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”" />
<link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”" />
<link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”" />
<link rel=”pingback” href=”" />
//<![CDATA[
K2.debug = true;
jQuery(document).ready(function(){
k2Search.setup(
"",
""
);
});
comment_status) or ('comment' == $post-> comment_type) ) { ?>
jQuery(document).ready(function(){ OnLoadUtils(); });
comment_status) or ('comment' == $post-> comment_type) )) { ?>
K2.ajaxCommentsURL = "";
//]]>
<body class=”" >
<a href=”/”>
<li class=”current_page_itempage_item”><a href=”/” title=”">
//
//<?php wp_register(”,”); ?>
comment_status) or (’comment’ == $post-> comment_type) )) {
wp_enqueue_script(’k2comments’);
}
?>
<html xmlns=”http://www.w3.org/1999/xhtml” >
<meta http-equiv=”Content-Type” content=”; charset=” />
<meta name=”generator” content=”WordPress ” />
<meta name=”template” content=”K2 ” />
<meta name=”description” content=”" />
<link rel=”stylesheet” type=”text/css” media=”screen” href=”" />
<link rel=”stylesheet” type=”text/css” media=”screen” href=”/css/rollingarchives.css” />
<link rel=”stylesheet” type=”text/css” media=”screen” href=”" />
<link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”" />
<link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”" />
<link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”" />
<link rel=”pingback” href=”" />
//<![CDATA[
K2.debug = true;
jQuery(document).ready(function(){
k2Search.setup(
"",
""
);
});
comment_status) or ('comment' == $post-> comment_type) ) { ?>
jQuery(document).ready(function(){ OnLoadUtils(); });
comment_status) or ('comment' == $post-> comment_type) )) { ?>
K2.ajaxCommentsURL = "";
//]]>
<body class=”" >
<a href=”/”>
<li class=”current_page_itempage_item”><a href=”/” title=”">
//
//<?php wp_register(”,”); ?>
torokzoli.hu/2007/02/25/drop-down-menu-wordpress-k2-hoz/
Every page link is indeed replicated in the header navigation bar
Just take a look at http://www.romainlevy.net/dontfollow
Think you can help me with that ? (I too am using wordpress 2.3.1)
Many thanks in advance for what you can do
A friend of mine helped me to resolve the issue by removing the ‘Home’ link from my top menu page links. From what I understand, the ‘Home’ link caused problems because it does not follow the same code structure as the other page links (for example, i never made made a wordpress Page for ‘Home’). Now, I just need to find out how to add in a new link for ‘Home’ without disturbing the dropdowns. Try that out next time; it’s not a 100% solution but i seem to have working dropdowns at least for the meantime. Hope that helps. My site is http://www.nlgx.org/dontfollow is case you want to see how the dropdowns work for me now.
I understand what you mean but yet
- I don’t know how to remove the ‘home’ link (which I renamed ‘Acceuil’ in french)
- plus I need to have a ‘home’ link
Does anyone know any other solution to my problem ?
Thanks,
Jack
[...] K2 Dropdown Menu [...]