get_categories
function will return an array of objects, each object a category.
You can read more about it here: https://developer.wordpress.org/reference/functions/get_categories/
Edit
And example, as Tim Malone mentioned in the comment there are examples on that page. But here is a simple one for you, that will display your categories in a list.
$categories = get_categories();
if($categories) :
echo "<ul>";
foreach ( $categories as $category ) {
echo "<li><a href="".get_category_link( $category )."">".$category->name."</a></li>";
}
echo "</ul>";
endif;
Related Posts:
- How To Find Out WordPress Category Table in MYSQL?
- How to convert regular categories to custom taxonomy?
- Deleting All tags except categories Wp database
- How Do I Merge Categories With phpMyAdmin
- how to remove category from database
- Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#
- Wacky taxonomy in wordpress
- Array: What is this value based on?
- How to list all categories and their IDs using SQL query?
- Deleting a category from WordPress admin does it remove it completely from the database?
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- How to store category and tags separatly on wordpress?
- Create categories manually in database
- Search Replace Database ONLY for posts of certain category?
- Backend – Categories and Menus conflicts
- add an image field to wordpress category
- Get all categories and posts in those categories
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Combine two taxonomies in a hierarchical tree
- Test if post has a category
- Make parent categories not selectable
- Reflect nested categories in appearance > menus
- I want to order categories based upon the latest post time
- Highlight current category in wp_list_categories
- How to find all posts without category and assign the “Uncategorized”?
- How to Override default update_count_callback for category
- WordPress previous_post_link exclude posts with multiple categories
- Is it possible to put tags and category information in the post as text?
- Order Taxonomy Term by date created
- Let visitors post comments on category page
- category_description() shows raw html after version 3.x?
- Is it possible to post with Word 2007 via XML-RPC and limit categories by user?
- how to get the categories for a single post in a hierarchical way
- Make parent category not selectable when it has child categories
- Can I use get_adjacent_post for specific categories?
- How to Filter categories in the permalink structure
- Is there a cleaner way to get post count for a category in category.php?
- products nested by subcategories in a current category archive
- get_the_category() always returns empty array
- Post count for category and tag
- Get current_parent_category in a loop or Cat ancestor- big problem
- Show number of articles in menu
- Can you pre-check wordpress categories?
- If posts category is “cars”, display image
- Is having thousands of unique categories a concern?
- How to prevent parent being choosen in wp_dropdown_categories
- query in category.php repeats itself
- Remove product category placeholder image (Woocomerce)
- How to “group” (categorize) the Pages together?
- How to make the link to the category for a post go to corresponding page number in archive?
- How to build a simple nav system of custom post type categories and its posts?
- Style category link depending on category ID
- Custom Walker for wp_list_categories
- How to insert category list into post creation page, and retrieve chosen categories?
- Shortcode interpreted as text
- Output category color option to each li item
- How do I display only two categories Instead of displaying all categories
- Hooking to walker_nav_menu_start_el to insert list of subpages
- scaleability of tags
- Having problems with paging
- How do I add a tag slug to a category URL to filter posts?
- Dropdown menu for subcategories
- Adding custom ID field to the categories
- Getting Category Children
- Child Category Conditional Question
- Getting the first parent of a hierarchical term
- Break down output of wp_list_categories
- Get the ID of the current post’s child category
- get category name in admin screen
- Return category posts with WP_Query
- How to add image for all posts associated to specified category?
- Show the current post’s category, without displaying parent category
- Include specific category in URL automatically
- WordPress Category Page Layout
- get_the_category – display only a single category for a post (not all categories)
- display category with background color
- WooCommerce Product category can be shown with multiple related URLs
- It is possible to display related posts from same category as the current post?
- Categories are not available AT ALL under Menus
- change image on single product page with js
- How to get all post categories without custom post type categories?
- Displaying a Category on a WordPress Page
- Hide specific category link from showing
- Display Category yearly wise in wp
- Get all subcategories IDs from categorie or categorieIDs
- Redirect category archives to pages
- Using heirarchial tags or Custom taxonomies
- Get posts base on category ratio of more then two categories
- Images appear in the header on all pages, but not category.php
- How can I add HTML classes for current taxonomy/term hierarchy into my pages to simplify styles?
- Change single.php template based on parent category
- WordPress and “pretty permalink”
- Display List of Categories Within a Custom Taxonomy
- New Category – custom taxonomy
- add custom option to get_categories dropdown
- Category as subdomain
- Categories as selectable links on submission form
- Displaying categories and subcategories without link
- Replace the post count on wp_list_categories with “Has Posts” instead of number and “No Posts” if none
- exclude category in loop.php