although @roikles offers a way to do it, I don’t think it is very flexible as you will have to go back in the code when you want to add a new category.
Another way of doing it can be to add the image of the subcategory as the description of the subcategory.
To be able to do so, you will first need to allow XHTML in category descriptions. Add this line to your functions.php
:
remove_filter( 'pre_term_description', 'wp_filter_kses' );
Then you can echo that description with wp_list_categories
Related Posts:
- Custom Walker for wp_list_categories
- Create menu locations for each category in wordpress
- How to create an automatic MultiColoumn MegaMenu with Categories WordPress
- Custom Nav Walker menu – Display category count
- Reflect nested categories in appearance > menus
- Category menu item and its last 10 posts as sub-menu
- How to split the categories of subcategories with thumbnails
- Is there a function to cause empty categories not to show in menus?
- Keep active class in post page
- How to show empty category in admin menus search
- Add custom taxonomy terms to WordPress menu dynamically & append #slug to url
- Automatically add product_categories to nav_menu
- Add Product categories to WordPress menu without losing hierarchy
- Custom Loop through category menu to include sub categories
- Add a specific category at a specific place to the menu that uses wp_list_pages
- Multiple menu items highlighted
- wp_nav_menu not highlighting the current category when viewing a single post
- Add title, post content, and category like add_post_meta and update_post_meta
- Show recent posts in menu?
- Show only one category
- Show Different Custom Menu on Different Category Pages
- Open subcategories in submenu on click in primary menu
- How to add Categories to the top menu of the website?
- hover image appears below placeholder instead of overlayed
- combine Code 1 with Code 2
- Looking for the best solution to build this Blog structure? Picture attached?
- Nav menu category links not showing
- How to show only one category in breadcrumb navigation
- Hard coded main navigation
- Highlight wp_nav_menu when category is selected
- Class active for Archive link – looped out
- Change thumbnail image depending product category
- Counter in loop in foreach
- Menus don’t work after 4.4 [closed]
- category permalinks
- Create menu / submenu from category subcategory and posts
- wp_list_categories in in nav_menu
- Creating Category Specific menus
- Woo Framework: woo_cat_featured not populating
- Redirect to another page using contact form 7? [closed]
- Different Output for “Every Other” Foreach Statement?
- get taxonomy thumbnail and use it as a variable in code
- Building Menu from Woocommerce Product Categories
- Show subcategories on a parent category page
- Admin: Navigation Menus do not show empty categories/taxonomies in the list’s search tab
- How to change the thumbnail size to a specific category?
- Give Children Unique ID’s
- Change div background acording to the selected category
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- Searching for a category returns nothing if category is empty
- function query_posts disabling current_page_menu class
- Show different menu on each woocommerce category page
- Theme for subcategories
- Same menu for different taxonomies to reach different content
- Multiple categories for one menu item?
- How to Sync Menu, Widgets and other masters from Main Website to its Sub Site
- Exclude category from foreach loop
- Pagination doesn’t work on multiple categories
- Theme modification for custom category menus
- Change appearance based on category but post is in two main categories
- How can i display category title over thumbnail?
- wp_list_pages() not showing on posts
- Is custom menu name and category name linked in wordpress?
- Explode() expects a string
- Global navigation in multisite: problem with categories
- How to automatically generate custom menu item from categories?
- WP-CLI Add category as menu item main-menu
- ADD DYNAMIC attribute for category to accordion
- How to remove an item from a custom Walker_Nav_Menu
- WordPress category title not update in navigation menu
- Function add class to second menu specific items if the page has a certain category
- Dynamically display sub-categories on primary menu without adding them
- How to set featured image as background for a specific category?
- Menu with category 2 category combined
- omit categories from main navigation menu
- Media Library Category Exclude Tree
- Multiple if statements with else for get_the_category [closed]
- PHP drop down menu for my get_category child of
- Cant get unique_array() work on get_the_category() foreach loop
- How to add Pagination to foreach loop to page
- Tag Menu items based on their categories
- How can I modify this code to iterate over an array of categories?
- Backend – Categories and Menus conflicts
- Hide category links if there is nothing in the categories – Main Navigation submenu item
- foreach,having wp_query inside, breaks after showing one result
- Category menu that filters out empty categories
- Conditions for single post
- Automatic menu creation for pages with categories?
- How can I add a Categories page link to a menu? [closed]
- Right way for setting categories
- Display only the latest post
- Make three menus with three category levels
- Paginating a list of all posts collected by category titles
- how to edit wp category widget
- Remove the current item from a menu
- Call Current Category
- Page permalink rewrite
- Chained drop-down menu for custom taxonomy using chained.js
- How to prevent uppercasing of menu titles
- Update wordpress menu with woocommerce products