Screenshot from 2016-03-11 12:48:57

wp_nav_menu() function is used by themes for displaying WordPress menus in theme header, footer, sidebar. Sometimes you need to customize nav menu with your own html tags, styles and classes. The normal way to do it is WordPress Walker, which we talked about in another post. Although this is the only perfect way to solve this task, this way is a little long and difficult. Sometimes we may need quicker solution for little customization in nav menu. In such cases we can use php output buffering. Here is sample: Continue reading →

Screenshot from 2015-05-02 14:01:03

WordPress Walkers are very useful solution for custom tree-like data structures. Today i will share simple code for Walker_Category class, which allows you to build custom structure when you call wp_list_categories() function. We know that generally when you call this function it gives you standard ul-li structure which is only customizable its arguments. But if we want to change its tree-like structure, then Walker_Category will help us. So lets say that we want to add some icons before category names. Let’s get started. Continue reading →