<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: Thematic menus - wrapping the &#60;li&#62; in the &#60;a&#62;</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Mon, 20 May 2013 04:19:37 +0000</pubDate>

<item>
<title>colfelt on "Thematic menus - wrapping the &#60;li&#62; in the &#60;a&#62;"</title>
<link>http://themeshaper.com/forums/topic/thematic-menus-wrapping-the-ltligt-in-the-ltagt#post-26701</link>
<pubDate>Sun, 29 Apr 2012 00:11:14 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26701@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;It's all on my local server right now. Nevermind, your suggestion was WAY better. As usual, I was looking for a complicated way to solve a simple problem. &#60;/p&#62;
&#60;p&#62;Displaying the A element as a block and giving it a width attribute is all that was required.&#60;/p&#62;
&#60;p&#62;Thanks again HtV!
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Thematic menus - wrapping the &#60;li&#62; in the &#60;a&#62;"</title>
<link>http://themeshaper.com/forums/topic/thematic-menus-wrapping-the-ltligt-in-the-ltagt#post-26697</link>
<pubDate>Sat, 28 Apr 2012 17:54:35 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26697@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;do you have a link to the styling you're using / trying to achieve?  i think it is a mistake to invert the markup... you're probably better off wrapping the text in an extra span so&#60;br /&#62;
&#60;code&#62;&#38;lt;li&#38;gt;&#38;lt;a&#38;gt;&#38;lt;span&#38;gt;&#60;/code&#62; which should also be easier to create via a Walker.&#60;/p&#62;
&#60;p&#62;but maybe you just need to put display: block on the A element and then add your padding to that.
&#60;/p&#62;</description>
</item>
<item>
<title>colfelt on "Thematic menus - wrapping the &#60;li&#62; in the &#60;a&#62;"</title>
<link>http://themeshaper.com/forums/topic/thematic-menus-wrapping-the-ltligt-in-the-ltagt#post-26694</link>
<pubDate>Sat, 28 Apr 2012 13:55:40 +0000</pubDate>
<dc:creator>colfelt</dc:creator>
<guid isPermaLink="false">26694@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I read through ALL 5 pages of posts in Helga's epic Thematic Menus Demystified topic and the other topics I could find. But I *think* I have a new challenge for this forum.&#60;/p&#62;
&#60;p&#62;Is there a &#34;clever&#34; way to flip the order of the &#60;strong&#62;li&#60;/strong&#62; and &#60;strong&#62;a&#60;/strong&#62; tags output in wp_nav_menu? I know I could remove thematic_access and smash in my own hand-rolled menu in it's place. But that seems like a clumsy solution.&#60;/p&#62;
&#60;p&#62;Why do I want to do this? Well, I've re-oriented my menu so it's vertical. And I have created nice backgrounds on hover with CSS, so the list items are a bit like buttons. But, you still have to click on the actual word in the menu list item (which is what the anchor tag wraps) and you can't click the rest of the block list item that is highlighted on hover (because the &#60;strong&#62;a&#60;/strong&#62; doesn't wrap the &#60;strong&#62;li&#60;/strong&#62;). In short, it's a usability problem when something highlights that you can't click.&#60;/p&#62;
&#60;p&#62;Does anybody know how I would alter the code (via my own functions.php) that generates wp_nav_menu (it's in includes/nav-menu-template - function start_el - line 67)? to switch these tags around?&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function start_el(&#38;#38;$output, $item, $depth, $args) {
		global $wp_query;
		$indent = ( $depth ) ? str_repeat( &#38;quot;\t&#38;quot;, $depth ) : &#38;#39;&#38;#39;;

		$class_names = $value = &#38;#39;&#38;#39;;

		$classes = empty( $item-&#38;gt;classes ) ? array() : (array) $item-&#38;gt;classes;
		$classes[] = &#38;#39;menu-item-&#38;#39; . $item-&#38;gt;ID;

		$class_names = join( &#38;#39; &#38;#39;, apply_filters( &#38;#39;nav_menu_css_class&#38;#39;, array_filter( $classes ), $item, $args ) );
		$class_names = &#38;#39; class=&#38;quot;&#38;#39; . esc_attr( $class_names ) . &#38;#39;&#38;quot;&#38;#39;;

		$id = apply_filters( &#38;#39;nav_menu_item_id&#38;#39;, &#38;#39;menu-item-&#38;#39;. $item-&#38;gt;ID, $item, $args );
		$id = strlen( $id ) ? &#38;#39; id=&#38;quot;&#38;#39; . esc_attr( $id ) . &#38;#39;&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;

		$output .= $indent . &#38;#39;&#38;lt;li&#38;#39; . $id . $value . $class_names .&#38;#39;&#38;gt;&#38;#39;;

		$attributes  = ! empty( $item-&#38;gt;attr_title ) ? &#38;#39; title=&#38;quot;&#38;#39;  . esc_attr( $item-&#38;gt;attr_title ) .&#38;#39;&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;
		$attributes .= ! empty( $item-&#38;gt;target )     ? &#38;#39; target=&#38;quot;&#38;#39; . esc_attr( $item-&#38;gt;target     ) .&#38;#39;&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;
		$attributes .= ! empty( $item-&#38;gt;xfn )        ? &#38;#39; rel=&#38;quot;&#38;#39;    . esc_attr( $item-&#38;gt;xfn        ) .&#38;#39;&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;
		$attributes .= ! empty( $item-&#38;gt;url )        ? &#38;#39; href=&#38;quot;&#38;#39;   . esc_attr( $item-&#38;gt;url        ) .&#38;#39;&#38;quot;&#38;#39; : &#38;#39;&#38;#39;;

		$item_output = $args-&#38;gt;before;
		$item_output .= &#38;#39;&#38;lt;a&#38;#39;. $attributes .&#38;#39;&#38;gt;&#38;#39;;
		$item_output .= $args-&#38;gt;link_before . apply_filters( &#38;#39;the_title&#38;#39;, $item-&#38;gt;title, $item-&#38;gt;ID ) . $args-&#38;gt;link_after;
		$item_output .= &#38;#39;&#38;lt;/a&#38;gt;&#38;#39;;
		$item_output .= $args-&#38;gt;after;

		$output .= apply_filters( &#38;#39;walker_nav_menu_start_el&#38;#39;, $item_output, $item, $depth, $args );
	}

	/**
	 * @see Walker::end_el()
	 * @since 3.0.0
	 *
	 * @param string $output Passed by reference. Used to append additional content.
	 * @param object $item Page data object. Not used.
	 * @param int $depth Depth of page. Not Used.
	 */
	function end_el(&#38;#38;$output, $item, $depth) {
		$output .= &#38;quot;&#38;lt;/li&#38;gt;\n&#38;quot;;
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I'm not confident that I can create something that will work...
&#60;/p&#62;</description>
</item>

</channel>
</rss>
