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 trialLisa Deignan
1,059 PointsId love to create a side-menu on each post-page which will have the same headings but different links?
Would any of the tutorials on Treehouse help with something like this? I have been struggling with it for weeks! Many thanks, Lisa
8 Answers
Eric Amundson
19,530 PointsLisa,
So for example, on "rugby player" and "ballet dancer" post I will have a side column recipe menu with breakfast lunch dessert. But on clicking breakfast on each i will be lead to a unique connected post-category.
To clarify, are you saying this:
Each post in the "rugby player" and "ballet dancer" category will show a sidebar block called "recipe menu" that lists links to individual recipes, broken up into breakfast, lunch, and dessert categories?
Maybe something like this:
Recipe Menu
Breakfast
- recipe 1
- recipe 2
Lunch
- recipe 1
- recipe 2
Dessert
- recipe 1
- recipe 2
Or something simpler like:
Recipe Menu
- Breakfast
- Lunch
- Dessert
Where each links to that recipe category?
Also, will this block of recipes be the same for both the "rugby player" and "ballet dancer" categories?
Trying to figure out how many unique sidebars or sidebar variations you'll have to see how dynamic / complicated it might get.
Zac Gordon
Treehouse Guest TeacherHow would the links be determined. If you can explain the logic we may be able to help translate to code.
Lisa Deignan
1,059 PointsHi Zac, Thank you for your reply,
On each post (post-page) I would like to implement a side-menu that has the same menu appearance but each tab will link to a unique post (Post page)
So for example, on "rugby player" and "ballet dancer" post I will have a side column recipe menu with breakfast lunch dessert. But on clicking breakfast on each i will be lead to a unique connected post.
Would this be possible to implement?
Thanks so much Lisa
Zac Gordon
Treehouse Guest TeacherLisa,
This is a good example of what I'm talking about. What you will need to do is flesh out the specifics for every post. You need to have a list that says if it's page X then display YYY items in the menu. Once you have this for every post you can begin figuring out the programming logic that will pull in the post ID and figure out what items to list in the menu.
The other option would be to write a plugin that added a field in your post edit page that let you select from the admin area what related posts you wanted to list and then echo them out on the page.
You might be able to use a plugin like this to manually select related articles and then list them in the menu. May save you a lot a lot of custom coding.
Lisa Deignan
1,059 PointsGreat, thank you for that,
I will try existing plugin option first before attempt the others! :-)
Lisa Deignan
1,059 PointsHi Zac,
Apologies for this.
I got slightly confused. It is categories I am looking to link to my menu.
So for example, on "rugby player" and "ballet dancer" post I will have a side column recipe menu with breakfast lunch dessert. But on clicking breakfast on each i will be lead to a unique connected post-category.
I assume option 1 and 2 that you gave to me will still apply for this?
Many thanks,
Lisa
Zac Gordon
Treehouse Guest TeacherDoes each post have a completely unique menu, or do all posts in a certain category have the same menu? Do certain posts share the same menus?
Lisa Deignan
1,059 PointsHi Zac
Basically on opening each post it will have a completely unique menu.
So on main-menu of site I go first to "Team-sports", click down to "Football" and on the Football page (which is also built as a category) I want a little side menu with Breakfast, Lunch, Dinner. Or
Main-menu I go first to "Dance-sports", click down to "Irish dancer" and on the Irish dancer page (which is also built as a category) I want a little side menu with Breakfast, Lunch, Dinner.
Side menu will look identical on "Football" and "Irish dancer" page but the links will go to different places( different categorys to be specific)
Breakfast on first will go to Football-Breakfast category and the second to the Irish-dancer-breakfast category.
I add content to these categories using "Press this" application in WP.
Thanks a million..
Lisa
Lisa Deignan
1,059 PointsLisa Deignan
1,059 PointsHi Eric
It will be the simple option of Breakfast Lunch Dessert as side-menu.
But block of recipes will be completely different for rugby player and ballet dancer. And for every other action activity.
Am I looking at some very complicated development work here? Thanks, Lisa