title: Reverse menu items and anchor tags using a custom walker class in WordPress
body: <p>WordPress navigation menus typically output as:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a href="location.html"&gt;Menu Item 1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="location2.html"&gt;Menu Item 2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="location3.html"&gt;Menu Item 3&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Typically you'd use a <a href="https://codex.wordpress.org/Class_Reference/Walker" rel="nofollow">custom walker class</a> in your theme to change around the arguments feed into these elements but how do you change the order they load in? This is my goal:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;a href="location.html"&gt;&lt;li&gt;Menu Item 1&lt;/li&gt;&lt;/a&gt;
    &lt;a href="location2.html"&gt;&lt;li&gt;Menu Item 2&lt;/li&gt;&lt;/a&gt;
    &lt;a href="location3.html"&gt;&lt;li&gt;Menu Item 3&lt;/li&gt;&lt;/a&gt;
  &lt;/ul&gt;
  </code></pre>