| | #1 |
| Grouchy Old Geezer War Room Member Join Date: 2006 Location: Ellijay, GA, USA. (Talk about being in the woods!)
Posts: 673
Thanks: 279
Thanked 62 Times in 47 Posts
|
I have a theme which lists my pages in a horizontal menu, with drop down sub-menu items for the sub-pages. I wanted to add a menu item for categories, so I added the following code to my menu.php script ... Code: <?php
wp_list_categories('sort_column=name&sort_order=asc&include=22,24,25&style=list&children=true&hierarchical=true&title_li=' . __('Memberships') . ' '');
?> Code: <?php
wp_list_categories('sort_column=name&sort_order=asc&include=22,24,25&style=list&children=true&hierarchical=true&title_li=' . __(' Memberships ') . ' '');
?> Code: <div class="kwadded" style="float:left; margin-left: 10px; margin-right: 10px;">
<?php
wp_list_categories('sort_column=name&sort_order=asc&include=22,24,25&style=list&children=true&hierarchical=true&title_li=' . __('Memberships') . ' '');
?>
</div> Code: <div class="kwadded" style="float:left; margin-left: 10px;">
<?php
wp_list_categories('sort_column=name&sort_order=asc&include=22,24,25&style=list&children=true&hierarchical=true&title_li=' . __('Memberships |') . ' '');
?>
</div> Can someone advise me of a way to get the menu item to include the right margin? Or, how to find out what is causing the problem? I don't know if it is being stripped out by the theme or Wordpress. Thanks in advance, Kirk |
| "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice." Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781) | |
| |
| | #2 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
|
Hi Kirk, these types of problems always grab my attention. Can you tell me what theme this is based upon? That would help me try it out and have a fiddle with it. Which is another way of saying, I need to see more of what the menu.php file looks like. Or someone's going to come along and have an "Ah Ha" moment for you but I'm happy to help out if that doesn't happen. Cheers Tim |
| |
| | #3 |
| Grouchy Old Geezer War Room Member Join Date: 2006 Location: Ellijay, GA, USA. (Talk about being in the woods!)
Posts: 673
Thanks: 279
Thanked 62 Times in 47 Posts
|
Hi Tim, I am using the iNews theme from iThemes (http://ithemes.com) I have a redistribution license to the theme if you want to take a look. And the aha's just aren't coming. I've piddled all evening. Thanks, Kirk |
| "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice." Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781) | |
| |
| | #4 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
|
Hey Kirk - what time is it over there? Well whatever you are happy to do, I'm ok with. You've probably become a bit weary eyed staring at this... Just PM me the details - I'm around for a wee bit and I'd love to be able to have you go....WoooHooooo! If you are into that kind of thing and then Get Some Sleep!Cheers Tim |
| |
| | #5 |
| Grouchy Old Geezer War Room Member Join Date: 2006 Location: Ellijay, GA, USA. (Talk about being in the woods!)
Posts: 673
Thanks: 279
Thanked 62 Times in 47 Posts
|
Thanks for the offer Tim, I just sent you a PM, and a copy of the theme through another channel. I am getting bleary eyed as you probably guessed. It am 1:40 in the AM here. I'm off to nighty night. Cheers, and all that sort of stuff. |
| "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice." Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781) | |
| |
| | #6 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
|
Ok Kirk, I tried that snippet of code they gave you on the Forum with the UL's etc.. and it works. So to get you going - use that instead of what you were trying. It's manual but if it works - use it. Code: <li class="page_item"><a href="http://consultantsupplyroom.com/membership/">Membership</a> <ul> <li><a href=http://"http://consultantsupplyroom....ership-login/">Please Log In</a></li> </ul> </li> Tim |
| |
| The Following User Says Thank You to Tim Brownlaw For This Useful Post: |
| | #7 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
|
Give me a nudge - yeah I'm awake! Umm yes, as you stated in your email , you got that bit working. To get the categories showing in the menu is going to take a little effort. I'm still looking. Cheers Tim |
| |
| The Following User Says Thank You to Tim Brownlaw For This Useful Post: |
| | #8 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
|
Kirk, I've had a god bash at it. It's interesting. The problem is the classes being generated. Listing of categories is a little different to pages. Having said that I've been playing with a new function to list the categories and make them look like pages for the menu only. But as I'm getting a bit blurry eyed I'll have to give it a rest for now but I'll be back on it. I'm trying to learn the in's and outs of Wordpress to make the propeller on my cap spin faster ( reference to being a nurd ) so it's why I've jumped in to help out. Nothing better than a real life problem to solve. We'll get there. There are a few ways to go and I'm just trying to find the one of least resistance by just changing the themes functions. Cheers Tim |
| |
| The Following User Says Thank You to Tim Brownlaw For This Useful Post: |
| | #9 |
| Grouchy Old Geezer War Room Member Join Date: 2006 Location: Ellijay, GA, USA. (Talk about being in the woods!)
Posts: 673
Thanks: 279
Thanked 62 Times in 47 Posts
|
Thanks Tim, If you are able to do that, it might be a popular plugin. I see a lot of folks asking similar questions every now and then. Will be waiting with baited breath ... Kirk |
| "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice." Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781) | |
| |
| | #10 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
|
Kirk, Check your email mate. It's got some "Stuff" in it that should do the trick for the time being. Cheers Tim |
| |
| The Following User Says Thank You to Tim Brownlaw For This Useful Post: |
| | #11 |
| Grouchy Old Geezer War Room Member Join Date: 2006 Location: Ellijay, GA, USA. (Talk about being in the woods!)
Posts: 673
Thanks: 279
Thanked 62 Times in 47 Posts
|
Great Job Tim ... It looks beautiful ... Any way to control which categories can be listed there? Say only certain ones in the list? I see the exclude=> action ... can the include => be used to limit the inclusions to the certain ones? However, that is a "picky" thing. It looks good enough I can live with it the way it is. Thanks 407 gazillion times over. Kirk |
| "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice." Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781) | |
| |
| | #12 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
|
Hi Kirk, I'm glad it's working. I thought you might want to have the "Exclude" ability ![]() I'll give it a go at putting that in. I was just making sure what I got working so far was what you were after. Only a few more days at my Day JOB and then I'm a free agent. So I'll have a bit more time. Cheers Tim |
| |
| | #13 |
| Grouchy Old Geezer War Room Member Join Date: 2006 Location: Ellijay, GA, USA. (Talk about being in the woods!)
Posts: 673
Thanks: 279
Thanked 62 Times in 47 Posts
|
Thanks again Tim, It's all beautiful. 'Exclude =>' worked out just fine. Took a minute or five to get my head in the right place. Now trying to figure out how to get the "No Categories" (which was edited to read "Please Log In") message to appear when no categories are allowed to show because they are protected. Will play and think. Kirk |
| "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice." Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781) | |
| |
| | #14 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Berwick, Melbourne, Australia
Posts: 156
Thanks: 5
Thanked 47 Times in 28 Posts
|
Hi Kirk, I've seen you've been having a good play with the "new" bit. I'm learning up on making it a plug-in. Seems like fun... One thing I have noticed though and that is - the words fall out of the menu when the category name get's too long. A thought I had was to maybe use the category description field and have it display in the menu. That way you can keep your longer Categories showing up on the page and the abbreviated versions in the menu. That was something I found in my digging around. Or the simpler way is to just have shorter category names. I see now that's not an issue for you, but it's something to take into consideration. It's all fun and thanks for letting me help you out. I appreciate it. I've now started in on the Plugin writing side of things and this little exercise was just the ticket... Cheers Tim |
| |
| | #15 |
| Grouchy Old Geezer War Room Member Join Date: 2006 Location: Ellijay, GA, USA. (Talk about being in the woods!)
Posts: 673
Thanks: 279
Thanked 62 Times in 47 Posts
|
Thanks Tim, I had the problem with long category names before and now that this is working, I just went in and edited the names so that they would fit. It is not related to the function ... but maybe your idea of using the description field might provide a solution. Thanks again, seventy or eighty times over. ![]() Kirk |
| "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice." Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781) | |
| |
|
| Bookmarks |
| Tags |
| category, format, menu |
| |