Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMarkus Mönch
16,383 PointsHow to create this type of menu in WordPress?
HI,
If you look at this site, and look at the menu, how is that supposed to be in the code?
1 Answer
Kevin Korte
28,149 PointsLet's ask the guy who made it. Aurelian Spodarec
I will say looking at the code, there is a scroll event that is adding classes to change the menus appearance.
Aurelian Spodarec
10,801 PointsAurelian Spodarec
10,801 PointsI don't know how to do it either :D
The only thing I know is on how to make one menu, without breaks, like this one.
Though on how to make a menu like that one, which the HTML looks like this
So there is also a menuAccount with the same Join and ENglish, which is in the menuCOntainer.
I have no idea how to make a menu like this to work in WP.
Kevin Korte
28,149 PointsKevin Korte
28,149 PointsGood point, I didn't realize it wasn't wordpress. You'd be right, a new Walker class should be used to create the desired html markup.
You could also probably modify the html that wordpress gives, you, but while more difficult to start, I think a Walker class is the better option here.
Aurelian Spodarec
10,801 PointsAurelian Spodarec
10,801 PointsCould you lead me on how should I do this? Because I'm not too sure :D I'm not too experienced in WP. I never did any different menu than the default one.
In CSS here as you can see, or HTML, yeah, I'm getting more experience in that, and you know it lol
So, how is that I should do this with Walker? I'm not really sure how this supposed to look in the code.
Kevin Korte
28,149 PointsKevin Korte
28,149 PointsSorry, not really. I haven't done much with Walker classes in a long time, and I no longer build wordpress sites. I just know what they can do, and are intended for. If i remember there was some extensive documentation about Walker classes on the official codex.
Aurelian Spodarec
10,801 PointsAurelian Spodarec
10,801 PointsWow. Really? I know you're a human now. Usually you knew everything : D I suppose you just have a very very strong foundation , and now you're just specializing in few directions.
Okay, I'll try to see. Thank you :)
Aurelian Spodarec
10,801 PointsAurelian Spodarec
10,801 PointsAhh xd I can't see a damn thing about this menu. Think I might just live WP atm.
Think it's better to learn PHP.. so I can do whatever and it can serve me in the long term run, instead of jumping to WP when I need to and trying to do stuff who knows what lol whithout putting in time to properly learn WP : p I don't know.
Need to learn more in depth PHP in general and JS, but think I live JS for now, I can somewhat do what I want in most cases with JS.