To print or to call all the slugs, you can use the following codes.
<?php
$cats = get_the_terms(get_the_id(), 'your-taxonomy-id');
if( is_array($cats) ){
foreach ( $cats as $cat ) {
echo $cat->slug.' ';
}
}
?>
For more details, follow the below link.
Add custom category name as data-filter to switch between these categories
Related Posts:
- wp_query and comment_parent – select only posts with top level comments
- Want to filter only parent post in admin area
- Custom Taxonomy breaking pages permalinks
- Setting proper query for multiple custom admin filters
- Append date to custom post type url slug
- Genesis filterable portfolio isotope [closed]
- Filtering WP_Query
- How to add a post slug to a url?
- creat filter with wp_query
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- How can I made custom taxonomies relationship?
- Filter Posts from the Main Query
- Redirect to another page using contact form 7? [closed]
- Can I display custom post types in home.php or need page template?
- Using page slug in wp_query
- conditional filter
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- Filter posts by their related field’s custom field
- WordPress doesn’t respect Page slug in custom post type url pagination. Keeps getting removed
- How to use multiple orderby conditions on query search results? (orderby one post type, relevance)
- WP Query Post Type with same Taxonomy name
- WP Query WordPress Post Type with the same Taxonomy name
- Add post id to url instead of WordPress default -2 suffix
- Display all posts in a custom post type, grouped by a custom taxonomy
- Query by post title
- How to get custom post type label and singular label from its slug?
- WP_Query() show posts that end later than today
- How to check if a WP_Query has data
- Change slug of registered custom post type in child theme
- Number of pages – multiple (custom) post types
- Retrieving 3 latest post from each of 5 different custom post types
- Get latest 4 post on a custom post filtered by category
- How to sort CPT by custom meta value (date), and return posts month by month
- Wp-query causing problems with the_content();
- Comparing timestamps in meta query doesn’t work
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Exclude current post when getting related post on custom post type and taxonomy
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- Ordering Custom Post Types with WP_Query
- How can I add a column in the wp_list_table of the admin area?
- How to filter the description of a custom post type
- Filter posts with meta_query NOT IN where value has multiple values
- is_main_query() not working for WP REST API
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Loop through Custom Post Type, and then show children within each iteration
- orderby in custom WP Query does not work
- Unable to retrieve any posts of CPT in wp-admin
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Rewrite slug for CPT
- Crafting WP_Query array, sort by date
- Using Same Slug With Multiple Post Types
- forming WP_Query for posts of all post types but from specific categories
- How can I get the number of custom post type posts that have a specific attachment image set?
- Remove the parent slug in a CPT URL
- Including metaboxes from custom post types in global search — continued
- Custom Widget WP_Query problem
- Sort and filter custom post type posts by custom taxonomy
- Removed custom post type slug but not working for child pages
- Search filter triggered & sort by custom post type
- Custom Post Type – Duplicate Page Slugs
- How can I add a filter to a particular post format?
- Remove permalink for custom post type
- WP Query post__in not returning correct results
- Custon Content within WordPress Loop
- WP Query ‘posts_per_page’
- How can I remove filters from custom post types?
- WP_Query order by two values
- Automatically update slug with latest title within custom post type [duplicate]
- How to Query in WordPress which shows Alphabetic Posts?
- postsperpage value not being applied
- How to use a specific custom field in a custom post type as slug
- Create query for both custom post type and category
- sort by name (slug) custom post type
- Getting titles from an array of IDs
- wp_dropdown_pages with tax_query clause
- Cache issue with WP_Query and custom field filtering
- Post Type => Any conundrum
- How to change CPT single post slug
- have to do a while have post to show for two custom post types sharing the same taxonomy?
- Difference between a default post type and a custom post type?
- How can I add image sizes for a specific custom post type?
- Problems in paginate_links with custom query loop and MB-Relationships
- subtracting the current post form then whole loop, which is generating all CPT titles
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Highlight a Post on archive page if it has a new comment?
- Manually build WP_Query
- Loop with Custom Post Type and Taxonomies
- Converting a checkbox filter for custom fields to a dropdown
- New WP_Query not isolating custom post types on front-page template
- Category slug not showing for Custom Post Type
- 404 on Pages for Custom Post Type & Query_Posts
- Pagination not working on homepage
- How to query custom post then display sections by meta value
- Using tax_query to get single post per category
- is this a bug or not?
- A to Z list for custom post types
- Paginate yearly archives for a custom post type
- Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
- WP Query – Can’t get posts with specific taxonomy
- Custom Post Type slug has the same Redirection entry