I am currently working on customizing my WordPress Menu. My goal is to assign a unique color to each menu item, while ensuring that the background color of child elements within pages and posts matches the parent text color.
Specifically, I envision the following structure:
- <ul id="main-menu" class="menu">
<li id="1">This is Red
<ul>
<li id="4">Background Red</li>
</ul>
</li>
<li id="2">This is Blue
<ul>
<li id="5">Background Blue</li>
</ul>
</li>
<li id="3">This is Green
<ul>
<li id="6">Background Green</li>
</ul>
</li>
- </ul>
While I was able to achieve this design on the homepage, I have encountered issues with replicating it across other pages. It seems that the styling does not appear as intended on these pages.
The CSS styling involving lists with '>' in them still poses a challenge for me, as I find it somewhat perplexing.
If anyone could recommend a helpful tutorial or provide guidance on how to accomplish this, I would greatly appreciate your assistance.