This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
onny:notizen:programmierung [2022/03/07 13:26] – [wordpress] 141.52.248.2 | onny:notizen:programmierung [2022/03/17 19:34] – old revision restored (2022/03/08 10:48) 65.108.46.72 | ||
---|---|---|---|
Line 615: | Line 615: | ||
margin-left: | margin-left: | ||
} | } | ||
+ | </ | ||
+ | |||
+ | custom menu walker, only printing <a> tags without list items | ||
+ | <code php> | ||
+ | class Nav_Footer_Walker extends Walker_Nav_Menu { | ||
+ | |||
+ | function start_lvl( & | ||
+ | $indent = str_repeat(" | ||
+ | $output .= " | ||
+ | } | ||
+ | |||
+ | function end_lvl( & | ||
+ | $indent = str_repeat(" | ||
+ | $output .= " | ||
+ | } | ||
+ | |||
+ | function start_el( & | ||
+ | $indent = ( $depth ) ? str_repeat( " | ||
+ | |||
+ | $class_names = $value = ''; | ||
+ | |||
+ | $classes = empty( $item-> | ||
+ | $classes[] = ' | ||
+ | |||
+ | $class_names = join( ' ', apply_filters( ' | ||
+ | $class_names = $class_names ? ' class="' | ||
+ | |||
+ | $id = apply_filters( ' | ||
+ | $id = $id ? ' id="' | ||
+ | |||
+ | $output .= $indent . ''; | ||
+ | |||
+ | $attributes | ||
+ | $attributes .= ! empty( $item-> | ||
+ | $attributes .= ! empty( $item-> | ||
+ | $attributes .= ! empty( $item-> | ||
+ | |||
+ | $item_output = $args-> | ||
+ | $item_output .= '<a class=" | ||
+ | $item_output .= $args-> | ||
+ | $item_output .= '</ | ||
+ | $item_output .= $args-> | ||
+ | |||
+ | $output .= apply_filters( ' | ||
+ | } | ||
+ | |||
+ | |||
+ | function end_el( & | ||
+ | $output .= " | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | wp_nav_menu( array( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ) ); | ||
</ | </ | ||
===== sql ===== | ===== sql ===== |