Create a dynamic menu
-
I’m trying to create a dynamic menu that will display a dynamic sidebar on each of these pages, using the same PODS template. It’s working now, but ony because it’s static.
- https://mouseandcastle.com/parks/magic-kingdom/
- https://mouseandcastle.com/parks/epcot/
- https://mouseandcastle.com/parks/hollywood-studios/
- https://mouseandcastle.com/parks/animal-kingdom/
I’m using PODS to expand my use of WordPress Categories…that’s why the actual word “Categories” was in the code. I tried this, with no success…
`[if magic-kingdom]
[each category]
<a href=”{@permalink}”>{@name}</a>
[/each]
[/if]PLEASE help me.
Thank you.
The page I need help with: [log in to see the link]
-
You need to use the category (taxonomy) name for both the if and each statement:
[if taxonomy_name] [each taxonomy_name] <a href=”{@permalink}”>{@name}</a> [/each] [/if]Cheers, Jory
Since I’m not using a custom taxonomy, I should be able to use the category name, correct? I’m still using PODS to extend the use of categories.
So now I have this…I think this is close to right, but it’s still not showing up…
[if magic-kingdom]
[each magic-kingdom]
<h2>{@name}</h2>
[/each]
[/if][if adventureland]
[each adventureland]
{@name}
[/each]
[/if][if fantasyland]
[each fantasyland]
{@name}
[/each]
[/if][if frontierland]
[each frontierland]
{@name}
[/each]
[/if][if liberty-square]
[each liberty-square]
{@name}
[/each]
[/if][if main-street-usa]
[each main-street-usa]
{@name}
[/each]
[/if][if tomorrowland]
[each tomorrowland]
{@name}
[/each]
[/if][if epcot]
[each epcot]
<h2>{@name}<h2>
[/each]
[/if][if future-world-west]
[each future-world-west]
{@name}
[/each]
[/if][if future-world-east]
[each future-world-east]
{@name}
[/each]
[/if][if international-gateway]
[each international-gateway]
{@name}
[/each]
[/if][if world-showcase]
[each world-showcase]
{@name}
[/each]
[/if][if norway]
[each norway]
{@name}
[/each]
[/if][if france]
[each france]
{@name}
[/each]
[/if][if china]
[each china]
{@name}
[/each]
[/if][if mexico]
[each mexico]
{@name}
[/each]
[/if][if germany]
[each germany]
{@name}
[/each]
[/if][if japan]
[each japan]
{@name}
[/each]
[/if][if italy]
[each italy]
{@name}
[/each]
[/if][if morocco]
[each morocco]
{@name}
[/each]
[/if][if outpost]
[each outpost]
{@name}
[/each]
[/if][if canada]
[each canada]
{@name}
[/each]
[/if][if the-american-adventure]
[each the-american-adventure]
{@name}
[/each]
[/if][if hollywood-studios]
[each hollywood-studios]
<h2>{@name}</h2>
[/each]
[/if][if animation-courtyard]
[each animation-courtyard]
{@name}
[/each]
[/if][if commissary-lane]
[each commissary-lane]
{@name}
[/each]
[/if][if echo-lake]
[each echo-lake]
{@name}
[/each]
[/if][if grand-avenue]
[each grand-avenue]
{@name}
[/each]
[/if][if hollywood-boulevard]
[each hollywood-boulevard]
{@name}
[/each]
[/if][if pixar-place]
[each pixar-place]
{@name}
[/each]
[/if][if star-wars-galaxys-edge]
[each star-wars-galaxys-edge]
{@name}
[/each]
[/if][if sunset-boulevard]
[each sunset-boulevard]
{@name}
[/each]
[/if][if toy-story-land]
[each toy-story-land]
{@name}
[/each]
[/if][if animal-kingdom]
[each animal-kingdom]
<h2>{@name}</h2>
[/each]
[/if][if africa]
[each africa]
{@name}
[/each]
[/if][if asia]
[each asia]
{@name}
[/each]
[/if][if dinoland-usa]
[each dinoland-usa]
{@name}
[/each]
[/if][if discovery-island]
[each discovery-island]
{@name}
[/each]
[/if][if oasis]
[each oasis]
{@name}
[/each]
[/if][if pandora]
[each pandora]
<h2>{@name}</h2>
[/each]
[/if][if rafikis-planet-watch]
[each rafikis-planet-watch]
<h2>{@name}</h2>
[/each]
[/if]The Menu doesn’t show up, but at least it no longer says “Pod Not Found”!
THAT’S IMPROVEMENT! 🙂BTW—I’m working with a mental condition, and I really do appreciate your patience. Thank you, Jori! It really means a lot to me.
Hi @greatbig47
I think you are misunderstanding how magic tags work. It looks like you are adding the actual terms in there. That is not how it works.
You can only use field names or taxonomies within magic tags. The content of these fields will vary per object.I think it’s best if you take your time and watch our introduction video to get a more clear view of how Pods works:
https://docs.pods.io/videos/grow-beyond-posts-pages-introduction-pods-framework/Cheers, Jory
The topic ‘Create a dynamic menu’ is closed to new replies.