From: Steve Sutton Date: Thu, 23 Jun 2016 20:44:32 +0000 (-0400) Subject: Adding a anchor tag around the title X-Git-Tag: v1.0.0^2~25 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=e77a069b559a5d0cdb99393bbf35740cb5a9a8a9;p=WP-Themes%2Fcsrye.git Adding a anchor tag around the title Ian will have to style this one. --- diff --git a/lib/menu-walker.php b/lib/menu-walker.php index 75bfec8..39e0c1f 100644 --- a/lib/menu-walker.php +++ b/lib/menu-walker.php @@ -20,7 +20,6 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu { static $saveParent = 0, $title = ''; $item_html = ''; parent::start_el( $item_html, $object, $depth, $args ); - //echo '
$object: ' . print_r($object, true) . '
'; // Insert style to display page's thumbnail if ( $depth == 0 ) { @@ -29,13 +28,12 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu { } if ( !$title && $depth == 1 ) { // get the page title from parent + $permalink = get_the_permalink( $saveParent->object_id ); $title = get_the_title( $saveParent->object_id ); - $output .= '
  • ' . $title . '

  • '; + $output .= '
  • ' . $title . '

  • '; } - //$output .= ( 0 == $depth ) ? '
  • ' : ''; $classes = empty( $object->classes ) ? array() : (array) $object->classes; if ( in_array( 'label', $classes ) ) { - //$output .= '
  • '; $item_html = preg_replace( '/]*>(.*)<\/a>/iU', '', $item_html ); } if ( in_array( 'divider', $classes ) ) {