Specifying Class style for Menu

Looking at your rendered output: <div class=”menu sf-menu”><ul><li class=”page_item page-item-2 current_page_item”>… It appears that ‘sf-menu’ got appended as a class to the menu container, rather than to the menu itself. The wp_nav_menu() function has two separate parameters: menu_class: CSS class applied to the menu list <ul> menu tag container_class: CSS class applied to the element … Read more

custom walker to add iconfont to wp_nav_menu

ok, I figured it out myself. instead of using the CSS class (as I cannot figure out how to filter it), I decided to use the description instead. under the lines with $attributes I have added this line: $description = ! empty( $item->description ) ? esc_attr( $item->description ) : ”; And then I added that … Read more

WordPress Navigation default output

wp_nav_menu is what you are looking for. Here are some examples. Using the depth parameter you can change the level of sub-menu. 0 leads to all levels. Ex. <?php $defaults = array( ‘theme_location’ => ”, ‘menu’ => ”, ‘container’ => ‘div’, ‘container_class’ => ”, ‘container_id’ => ”, ‘menu_class’ => ‘menu’, ‘menu_id’ => ”, ‘echo’ => … Read more

Custom Links in Walker Class

Test for … $item->object=”custom” This is used for custom links only. $item->object is always the post type or the item type (category for example). Not sure what happens when someone registers a custom post type named custom 🙂

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)