You can use this function:
the_widget( 'WP_Widget_Categories', 'dropdown=1&hierarchical=1' );
This function give you a select box and you will get all the parent categories and sub-categories. After applying this code inspect category select box, then you can manipulate your HTML code. And show your category as you wish.
If you don’t want any select box, then you just remove "downdown=1&"
. This will give you a whole list of all categories and sub-categories. After applying this code inspect category select box, then you can manipulate your HTML code. And show your category as you wish.
Hope this will help!
Related Posts:
- Redirect to another page using contact form 7? [closed]
- Display posts by alphabetical order
- Category archive in menu
- Make a Custom template for a specific category in wordpress
- How to make horizontal scrolling menu [closed]
- Add section (add_settings_section) to a custom page (add_submenu_page)
- What’s the easiest way to duplicate an entire navigation menu?
- Way to force media uploader use custom image size
- How to call “page specific menu items” in template [closed]
- Restrict access and display for categories
- Plugin for changing a post’s category based on it’s post date?
- Woocommerce category description as subtitle
- Get subcategories with JSON API plugin
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- How to show custom static content at top of each category page?
- How do I make a wordpress plugin with menu item etc
- How to use get_categories() with Event Organiser plugin
- Server-side subscribe by email?
- plugin for wp_list_categories with posts
- Creating WordPress Plugin solely for Admin panel with dash menu and submenus
- Multiple navigation menus to a location?
- Making menu link open in new tab?
- How can i list random post from multiple category?
- My Category is too big on the Menu what can i do?
- Getting a List of Categories for Use in a Plugin?
- Not able to open category post [closed]
- How to make a customize role and view a specific plugins base on that role?
- Easy Digital Download Sub category
- Solutions to repost categories into multisite blogs?
- Assign post format to categories
- Using WP Category Lists Plugin to Dynamically Display Category (PHP)
- Events Plugin that works with existing categories?
- How to get the element ID from new menu list that added with add_filter()?
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Search for categories
- Delete mobile menu button [closed]
- Changing page URL and connect newsletter to MailChip
- Dynamic admin submenu
- Custom Permalink Plugin and Current Page/Ancestor in Menus
- wp-custom-menu filter removes the current_page_item class
- WordPress “Categories to tags converter” not working. Pointing to import.php instead
- How do I apply style to each category of a list?
- add_action does not call the function
- Recent posts per category loop?
- How to get menu location in wp_update_nav_menu hook
- PHP script from functions php is loaded via admin-ajax to div…and the result is 0, not the desired content
- Ambrosite Next/Previous Post Link Plus or WP next_post_link to cycle through top level category
- Is changing post from category in a large blog a good practice?
- Progmatically adding menu links to the default (Top) or Footer menu
- WordPress Custom Menu Admin helper plugin
- How can I add a fixed vertical menu to my site? [closed]
- WooCommerce Hiding A Certain Category From Being Displayed On Single Product
- How can i listing current category and Featured Category post list?
- Dropdown menu on click change
- How do i specify a url to which to redirect the user after he logs out from facebook?
- I cannot include a file in my plugin settings page
- How to get Recent Post From Each Category with Thumbnail?
- Category “same post” retreive and display
- Add a new category for posts
- Visual composer custom element error
- How to display the category name in the tab and post inside the tab in WordPress?
- WordPress Dashboard add user password not working, etc
- What plugin would make this happen? If is the theme
- WordPress site hamburger menu toggle not working
- Add custom WordPress admin page with pretty url via code
- I need to show side menu in wordpress
- Scroll to ID broken in main menu
- Unset plugins on front-end belonging to specific category
- Category as Subdomain for One WP Install
- Page Contents showing in Footer Area
- Ajax Load More on Hierarchical Categories
- Related post based on 2 categories
- How to insert category name above post title in a featured pages plugin?
- How to build a navigation menu for long-form texts like this one
- WordPress Categories from Plugin
- Show all posts of all categories but excluding a category on custom blog page with pagination of my theme
- Showpost and last
- add_media_page function not creating submenu
- How can I pass value to function in add_menu_page?
- Is it possible to setup Category wise Subsciption?
- Automatically add child pages to menu
- How to add plugin activity in the menus?
- How change menu for each user in plugin?
- Filter EVERY category link with my plugin
- how to change/remove/hide menu under installed plugins
- CSV file header
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- Redirect url in plugin to somewhere else?
- Editing “Kahi’s Highlight Used Categories” plugin code – highlighting parent and child category in post page
- How to activate/deactivate menu tab and keep the same id?
- wp_insert_post_data filter to set category
- How can I add different menus (different style menu) on each page?
- How can I create a navigation menu in the sidebar that can also act like a slider?
- woocommerce retriving category name as div class?
- query_vars in plugin when using custom permalinks
- Plugin: Custom menu item problem
- How to pre-set WordPress settings for specific posts?
- Is it possible to know which menus are owned by a plugin?
- My wp_update_nav_menu action is firing twice
- How to check if the Menubar contains no items?