Title: Collapsable Menus
Last modified: August 18, 2016

---

# Collapsable Menus

 *  [sithicus](https://wordpress.org/support/users/sithicus/)
 * (@sithicus)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/)
 * I’m hoping to find a tutorial for collapsable menu’s that will allow me to expand
   and collapse a menu based on the Catagory.
 * ex//
    Main Catagory Sub Catagory Blog Post
 * each level would be expandable and collapsable, I’ve seen a tutoria to do something
   like this in MT, I don’t really care if it is a pure css or a javascript method,
   although of course a pure css method would be kind of cool, if anybody know where
   might be able to find something like this.. i would really appreciate the help,
   thanks
 * oh here is the mt tutorial showing roughly the same thing
 * [http://www.elise.com/mt/archives/000674expandable_list_menus.php](http://www.elise.com/mt/archives/000674expandable_list_menus.php)
 * thanks
    -chris

Viewing 15 replies - 1 through 15 (of 33 total)

1 [2](https://wordpress.org/support/topic/collapsable-menus/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/collapsable-menus/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/collapsable-menus/page/2/?output_format=md)

 *  [gillie2tat](https://wordpress.org/support/users/gillie2tat/)
 * (@gillie2tat)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138612)
 * Yes that is exactly what I was asking for in my suggestion here.
 * [http://wordpress.org/support/topic.php?id=22297](http://wordpress.org/support/topic.php?id=22297)
 * It would certainly be reasonably easy to implement in an HTML webpage so I can’t
   imagine it won’t be in WordPress.
 *  Thread Starter [sithicus](https://wordpress.org/support/users/sithicus/)
 * (@sithicus)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138620)
 * It’s ultra easy to do in html so I’m hoping someone has implimented this for 
   wordpress.
 *  [gillie2tat](https://wordpress.org/support/users/gillie2tat/)
 * (@gillie2tat)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138743)
 * bounce
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138746)
 * Have a look at my site – bottom of the menu.
    If yes, it is detailed here: [http://www.tamba2.org.uk/wordpress/kadabra.txt](http://www.tamba2.org.uk/wordpress/kadabra.txt)
 *  [gillie2tat](https://wordpress.org/support/users/gillie2tat/)
 * (@gillie2tat)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138766)
 * Thanks so much!
 * Just a quickie – where you say “In `<head>` I have this line:” do you mean the
   <head> of the index.php file?
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138767)
 * I do, yes 🙂
 *  [chansop](https://wordpress.org/support/users/chansop/)
 * (@chansop)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138778)
 * i was thinking about doing this with my menus, but is there a simple way for 
   subsequent pages to remember what’s expanded and what’s not?
 *  [gillie2tat](https://wordpress.org/support/users/gillie2tat/)
 * (@gillie2tat)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138812)
 * Sorry I’ve got kinda stuck with this – I followed the instructions to the letter,
   I thought – and now my site is sticking at the [@import](https://wordpress.org/support/users/import/)
   point – [http://www.craftnslace.net/wordpress](http://www.craftnslace.net/wordpress).
 * I am uploading .txt versions of the problem files and hope you’ll be able to 
   diagnose what is wrong from that as I know nothing about .php.
 * If necessary I’ll just live with the original version but I’d really like to 
   have the onclick dropdown menus:)
 * I am using the Firefox web browser on Windows XP Service Pack 2.
 * I did create the directory for the kadabra.js file exactly as directed – [http://www.craftsnlace.net/wordpress/T2/Hacks/kadabra.js](http://www.craftsnlace.net/wordpress/T2/Hacks/kadabra.js)
   if you need to review it at its location.
 * The .php file is at [http://www.craftsnlace.net/index.txt](http://www.craftsnlace.net/index.txt)
 * The CSS file is at [http://www.craftsnlace.net/wp-layout.txt](http://www.craftsnlace.net/wp-layout.txt)
 * Many thanks!
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138813)
 * `<style type="text/css" media="screen">
    @import url( <?php wp_layout(); ?> );
   </style> is wrong, you need something more like this:
 * `
    <style type="text/css" media="screen"> @import url( <?php echo get_settings('
   siteurl'); ?>/wp-layout.css ); </style>
 *  [gillie2tat](https://wordpress.org/support/users/gillie2tat/)
 * (@gillie2tat)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138814)
 * Yes that worked thank you – but the subcategories thing isn’t working, any idea
   why?
 * Also, the [http://www.craftsnlace.net/wordpress](http://www.craftsnlace.net/wordpress)
   isn’t displaying at all in Internet Explorer 6, just a blank screen – no error,
   nothing. It is however displaying in Firefox 1.0 and Netscape Navigator 7.1.
 * Is this a browser issue or is it something I’ve done wrong still?
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138815)
 * I don’t know what you subcats ar so I can’t tell if they are there or not. I 
   have 2 subcats though and they display so right now it’s hard to say.
 * I also see nothing in IE6, but I can’t get the page to validate – that might 
   give the clue as to the reason. If you can change the characters it mentions:
   
   [http://validator.w3.org/check?uri=http%3A%2F%2Fwww.craftsnlace.net%2Fwordpress%2F&charset=%28detect+automatically%29&ss=1&verbose=1](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.craftsnlace.net%2Fwordpress%2F&charset=%28detect+automatically%29&ss=1&verbose=1)(
   It will just want the ascii equivalent, and pasting the offending character into
   this page: [http://www.inr.net/tools/html-encoder.cfm](http://www.inr.net/tools/html-encoder.cfm)
   will give you that) and get things valid, it should be easy to find
 *  [gillie2tat](https://wordpress.org/support/users/gillie2tat/)
 * (@gillie2tat)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138819)
 * OK yes all my subcategories are showing – if you scroll down [http://www.craftsnlace.net/wordpress](http://www.craftsnlace.net/wordpress)
   and look for where it says ? Categories (and I don’t know where the question 
   mark came from!) with the dated diary entries listing, that is my Categories 
   section. Everything above that is my Links.
 * Unfortunately though the page you mention tells me WHERE the errors are it doesn’t
   tell me WHAT they are – and as I don’t know PHP that doesn’t help me to resolve
   the problem I’m afraid.
 * Here is what I mean:-
 * 113: #### encoding problem on this line, not shown ####
    128: #### encoding problem
   on this line, not shown #### 149: #### encoding problem on this line, not shown####
   157: #### encoding problem on this line, not shown #### 164: #### encoding problem
   on this line, not shown ####
 * So I’m sorry I have no idea how to resolve this or what to do next.
 *  [gillie2tat](https://wordpress.org/support/users/gillie2tat/)
 * (@gillie2tat)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138820)
 * I have by the way checked my source code at [http://www.craftsnlace.net/wordpress](http://www.craftsnlace.net/wordpress)
   and on those lines it’s trying to set up the kadabra coding so I still have no
   idea what to do next.
 *  [Cyndy Otty](https://wordpress.org/support/users/ceo/)
 * (@ceo)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138821)
 * Go into your index.php and C&P the lines it’s coming up with as errors and paste
   them into the html encoder that Podz linked to above – what it spits out for 
   you is what should be on the lines the validator can’t read.
 *  [gillie2tat](https://wordpress.org/support/users/gillie2tat/)
 * (@gillie2tat)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/collapsable-menus/#post-138843)
 * OK I think I’ve figured out where things are wrong and I’m posting here in case
   someone else is having the same difficulty and hasn’t posted.
 * If you look at the index.php file in the Template section
 * <?php get_links_list(); ?>
    <li id=”linkage”>[ï¿½ Site Linkage](https://wordpress.org/support/topic/collapsable-menus/?output_format=md#)
   <ul id=”m1″> <?php wp_get_links(1); ?>
 * <li id=”categories”>[ï¿½ Categories](https://wordpress.org/support/topic/collapsable-menus/?output_format=md#)
   
   <ul id=”m2″> <?php wp_list_cats(); ?>
 * <li id=”archives”>[ï¿½ Archives](https://wordpress.org/support/topic/collapsable-menus/?output_format=md#)
   
   <ul id=”m3″> <?php wp_get_archives(‘type=monthly’); ?>
 * where it says <a href=”#” I think that’s the problem. I need to replace the “#”
   with a url.’
 * Next question is how do I find the correct URL to use?

Viewing 15 replies - 1 through 15 (of 33 total)

1 [2](https://wordpress.org/support/topic/collapsable-menus/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/collapsable-menus/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/collapsable-menus/page/2/?output_format=md)

The topic ‘Collapsable Menus’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 33 replies
 * 6 participants
 * Last reply from: [sgwood](https://wordpress.org/support/users/sgwood/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/collapsable-menus/page/3/#post-139010)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
