- This topic has 6 replies, 4 voices, and was last updated 15 years, 5 months ago by imported_Ryan.
-
AuthorPosts
-
October 19, 2008 at 3:38 am #413clickMember
Hello,
How would I get a dropdown list of posts underneath each category on the menu bar?
Thanks.
October 19, 2008 at 6:42 am #3949imported_RyanMemberHi,
To do that, you would need to use the custom code option and manually add new items as it is created.Another alternative would be to not use the suckerfish() function and instead use a custom script to achieve it. I’m not sure how to do that dynamically with changes in categories, but if you know what the categories are to be added already, then I could create a script which would display the recent posts for each of those categories in a new dropdown; then if you needed to add another category at a later date it would just be a matter of following some instructions to add a little more code to the script to add that new category. I don’t have time to do that for free though. If you are interested, then sign up for our premium membership option and I’ll rustle something together for you … https://geek.hellyer.kiwi/premium_support/
February 17, 2009 at 3:18 am #3950imported_RyanMemberI’ve sent some programmers in the direction of this forum topic to ask about how much it would cost to write a script to do this.
[b:1vthd57v]The requirements are:[/b:1vthd57v]
1. It must write a list of categories just like wp_list_categories
2. Nested within that list of categories will be a list of posts form within those categories
3. That’s it. Not much to it really.
It would output something resembling the following:
[code:1vthd57v]
<li><a href="">Uncategorised</a>
<ul>
<li><a href="">Hello world 3</a>
<li><a href="">Hello world 2</a>
<li><a href="">Hello world 1</a>
</ul>
<li><a href="">Dogs category</a>
<ul>
<li><a href="">Post about labradors</a>
<li><a href="">Post about chihuahuas</a>
<li><a href="">Post about sausage dogs</a>
</ul>
[/code:1vthd57v]Essentially I need something which behaves like wp_list_categories, but which nests lists of the posts (including links) underneath each category.
February 18, 2009 at 6:21 pm #3951netexMemberSo there is no way to put php scripts in the custom code boxes…even if we don’t wrap them with php tags?
That would be a nice feature.
February 18, 2009 at 9:31 pm #3952imported_RyanMemberThe problem with allowing PHP scripts is that it could potentially open up security holes. You would be adding PHP code directly into your SQL database and my concern is that someone would find a loophole which would allow them to run their own scripts for there.
Your post has got me thinking of two things I should do:
(1) I’ll change the label ‘Custom Code’ to ‘Custom HTML’. It’s obviously not clear enough that you can’t add PHP at the moment.
(2) I could make a module for the plugin. So those who want to add PHP to their menu without delving into their themes code can do so from the plugins admin page by simply activating another plugin which would add more functionality to the regular plugin. By adding it as a module it isn’t opening up any security holes for regular plugin users and it will keep it’s usage fairly low so will be less of a target for evil hackers. I suspect there would be zero security holes in it, but I don’t trust myself enough to go pushing the limits of my PHP knowledge security wise.
I’ll look at doing this for the next release. I’ll need to figure out the best way to implement it first though.
June 18, 2009 at 10:55 pm #3953ArnoMemberHi Ryan and congrats for all that great work.
This thread looks like it’s about my problem. Im desperately looking at a way to make the ML Nav plugin to create a list <ul><li>etc like this:
Cat > (Sub-cat >) Posts
Im cool with the front-end styling (CSS/JS) but I don’t have the PHP know-how to customize your plugin to make that extra sub-level of posts appear.
If you could take a look please, that would be so awesome?* Where is your CSS?
> typed in the Appearance tab, as normal* What modifications have you made to the CSS?
> just colors and sizes, nothing major* What browsers are you having problems with?
> pbm not browser-dependant yet (more like generating the right HTML) but Im dev in FF3 then testing in IE6-7-8, Chrome and Opera* What is the URL for your site?
> jourdheuil-paysagistes(dot)com/wp/ [don’t wanna mess up stats or create huge traffic with an active link]Thank you so much in advance
A.June 23, 2009 at 12:32 pm #3954imported_RyanMemberArno’s question was dealt with via email.
It turned out they required something quite complex and I’m not sure I can do it.
-
AuthorPosts
- You must be logged in to reply to this topic.