Why don’t you use get_categories instead. Here is an example:
$categories = get_categories();
$output="";
if($categories) {
$output = "<ul class="list-inline">";
foreach($categories as $category) {
$output .= '<li class="list-inline-item"><a href="'.get_category_link( $category->term_id) . '">'.$category->cat_name.'</a></li>';
}
$output .= "</ul>";
}
echo $output;
Head over here for more available modification options
Related Posts:
- How to add background image control to page admin controls?
- Why does the ‘wp_nav_menu’ function work only until a menu is created?
- Some questions about how proper add 2 CSS file in a WordPress theme?
- I can’t add CSS with functions.php
- why can’t i add front.css to my frontpage.php
- Advanced method to control cache of enqueued style/script
- Why don’t ‘wp_nav_menu’ CSS classes work until a menu is created?
- Functions.php Problem
- Change CSS for logged in users
- Redirect to another page using contact form 7? [closed]
- ACF not showing
- How to customize the_archive_title()? Cannot figure out how to change the value it produces [duplicate]
- How to stop wordpress from injecting hard-coded style into image attachments with captions
- different style sheet for just one page template
- Custom styles.css sheet for visual editor
- Is my code correct to enqueue CSS on a specific page?
- Control the srcset much more (not all sizes in it each time)
- Check if the image size is available and if not use ‘full’ image size
- Way to store featured image width and height in two separate variables?
- header_image() with CSS
- Remove Custuomize Sections
- Can we create our own theme’s function.php?
- Not all CSS elements transferring via parent to child?
- Define PHP variable from a seperate API if statement
- Excerpt for pages not showing
- get_pages() Returns Only One Item
- Split Media Queries in different files!
- JQuery undefined and Stylesheet loads in bottom along with js files
- problem loading stylesheets to wp_head dynamically
- Apply styles to blockquote element with the WYSIWYG editor
- Does size of a theme’s functions.php file matter?
- Functions php shortcode for displaying main menu with no child items
- get_next_posts_link() returns no result despite available posts
- Nav menus all outputting the same links
- PHP 7.1 | Warning: A non-numeric value encountered in
- Parent theme styles overriding child theme CSS [closed]
- Theme JS is available but theme CSS isn’t
- Proper Way to Load stylesheet on Condition
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Getting the teaser text without overriding global variables
- Default Nav Highlight
- Combine two active_callbacks into one on theme customizer
- WP Customizer API loaded into functions.php
- Custom styles in Tiny MCE with an external CSS file
- call_user_func_array() expects parameter 1 to be a valid callback, function
- get_template_directory_uri() links to child theme not parent
- “options.php” not found
- How to store a number (coming from cookie) into query vars for later usage in other filters?
- Is this an acceptable practice for WordPress theme development?
- remove/hide wp-editor
- What is the correct way to include my new functions and scripts in WordPress?
- Getting out side of wp root folder from function.php using absolute path
- wp_nav_menu work in functions.php but not in the theme
- Rewrite Question Mark in Post Template with URL Parameter for clean URLs
- Page Template Won’t Load Correct CSS File
- contact form in template with jquery,validate and ajax
- current_page_item is missing inside wp_nav_menu
- Why a SlideShow (made using JQuery FlexSlider) can’t work if I load it form functions.php but work if I load it from my footer.php file? [closed]
- Why I can’t load my JavaScripts using an hook inside my functions.php file?
- Can’t change theme name
- define css class in functions.php
- Woocommerce Variable Product Dropdown for Custom Shop Template
- Completely Disable WordPress RSS Feeds
- How to fix Function create_function() is deprecated in / themes
- Exclude specific post from query
- WordPress wp_dequeue_script remove all other scripts
- Combine page types and Custom Taxonomy in a functions.php command
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- Can’t load assets
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- How to reference different css (bootstrap) stylesheets for the header and body of a page?
- Is_Page doesnt detect my page
- Test CDN link from function.php or wp_enqueue_script/style?
- Can we have conditional CSS styling?
- CSS style and app.js not loading
- Post content overflows on my mobile phone
- Stylesheet does not load despite functions.php
- How to customize archive widget only for cpt?
- Remove clickable Link of WordPress Site Logo from Woocommerce Single Product page
- wp_title() return random number
- Why does echo on functions.php not yield result in source code?
- How do I make a custom “Read More Blogs” button for my blog page
- function class doesnt work
- Help using ShortCodes to style whole chunks of the post
- How to offset main query without affecting other queries and backend
- Setting Up Child Theme To Take Priority
- how to remove a tag in the_category function
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- CSS disabled after getting rid of emoji
- Add meta data in head from theme
- How to add styles in existing function?
- what is `get_section()` and how to use it?
- Woocommerce – Switching Price for Category
- Adding a class to the body of an inactive site using multisite
- Conditionally apply css for a specific template part
- How do I dequeue a Stylesheet, stored in an ‘Assets’ folder?
- Remove External Links from WordPress posts Using add_filter() in Theme functions.php
- Child Theme not loading multiple stylesheets
- How to retrieve image IDs from shortcode content?
- HowTo: Add wrapper to columns shortcode?