Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112926

jwfish81 on "Custom Menu HTML with Walker ?"

$
0
0

Hi. I am fairly new to wordpress, and am looking to move my website to the wordpress CMS. I want to retain my site's current design, and I am having trouble getting the menu to style properly.

I have searched and researched to no avail about creating a custom menu walker to output the exact html I would like, instead of generating all the CSS class/ids that a regular menu creates.

I have never used or created a custom walker before, and cannot seem to find any good tutorials anywhere explaining how to create one or even what each line of the code does.

I would like the output html to be as follows:

<div id="links">
         <ul class="links">
            <li id="links1"><a href="index.html" class="current"></a></li>
            <li id="links2"><a href="about.html" class="base"></a></li>
            <li id="links3"><a href="contact.html" class="base"></a></li>
            <li id="links4"><a href="site_map.html" class="base"></a></li>
         </ul>
      </div>

I would also like the 'a' class to be "current" for each page that the user is currently on (i.e. when they visit the About page, then the "about/" link 'a' class should be "current" and all the rest should be "base")

I hope I have explained myself well; please feel free to ask me any questions if I did not make sense.

Thanks for the help in advance.


Viewing all articles
Browse latest Browse all 112926

Trending Articles