Sounds like you’d want to use this: http://codex.wordpress.org/Function_Reference/wp_get_object_terms
If you’re using a custom taxonomy, add that where it says “post_tag”.
unset($tags);
foreach(wp_get_object_terms($post->ID, 'post_tag') as $tag) :
$tags .= ' ' . $tag->name;
endforeach;
And then add it to your anchor tag:
<a href="https://wordpress.stackexchange.com/questions/36707/<?php the_permalink(); ?>" title="View Item" class="product_view_sm<?php echo $tags; ?>">..View Item..</a>
Related Posts:
- How do test if a post is a custom post type?
- List all the tags from a custom post type
- limit selection of custom taxonomies to one?
- tag.php doesn’t work with tags on a custom post type post?
- How can I include custom post types on a tag page?
- Taxonomy count per Post type
- If Post Type equals, then display X content
- Load custom posts with same tag as page
- post_tag taxonomy with custom post type
- Display several random posts, but make sure a condition is met
- Adding post tags to custom post types
- show tags of custom post type ONLY
- Tag list & tag index for custom post type
- jQuery UI in Admin (Best Practice?)
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Find callback function for custom taxonomy metabox
- Getting a div content of a post in wordpress?
- Debug whats going on inside a function called from AJAX
- Get posts with tag all post types
- Search Custom Post Type with all meta attached?
- Exclude custom function content from certain pages
- Show certain terms from custom taxonomy but exclude ‘parent’ terms?
- Custom post type tag archives don’t work for basic loop?
- Exclude Custom Post Type & Pages From Auto-Tag Function
- Adding An Author Tag To Posts Automatically
- How to save the checked boxes?
- How to search from specific post type with tags?
- Custom post type with tags
- Function like in_category for custom taxonomies
- Tag.php not displaying posts with the tag
- Registering tags taxonomy for a custom post type
- Query for custom posts with a specific tag slug
- Categories and Tags not working!
- associate custom post type with tags with specific pages
- Is it possible to make tag archive page specific to Custom Post Type?
- Timepicker-addon doesn’t show – Datepicker works fine?
- Query Custom Post Types & category_name?
- Custom post type with file upload – need to “set as field” instead of “send to editor”
- Search doesn’t find tags or categories in custom post types
- different template for first and second level custom post page
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- Navigation menus not showing because of custom post type filter
- How to make a custom taxonomy selectable in post publish area?
- Add Tags to custom post type
- Where to store custom tagging data associated with a custom post type
- Can custom taxonomies items have attached properties?
- Filter categories of posts with checkboxes
- How to convert Post Object Custom Field into Tags
- how to display new private message to users?
- How to add independent “Tags” to Custom Post Type?
- Custom Post didn’t display on tags page
- load wordpress events into full calendar jquery
- Automatically / dynamically populating tags in custom post type
- Rewrite url post_tag for custom post type
- CPT not entering jQuery ready state
- Add tags to a “pending” post before publishing
- Filterable portfolio in WordPress using jQuery isotope
- Collect custom post in a calendar
- Multiple domains, Single database, 1 Parent/Master with all content, other domains/slaves with filtered content (based on “location” variable)
- Submitting custom post from frontend,jQuery ajax, and custom validation – can’t find proper place to insert wp_insert_post()
- Custom Post Type tag taxonomy “Page Not Found”
- Do not output category and tag URLs
- jQuery tab_title already in use
- Display content based on Author Custom Post type
- Custom post tag images not displaying with ACF
- Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- How can I include custom post types on a tag page?
- Filter custom post type by tags
- Loop multiple taxonomy in custom post
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Custom Post Type – Admin Columns
- Generating List of Tags from Custom Post Type
- Taxonomy count per Post type
- Archive.php is not displaying tags
- Toggle a metabox based on a selection
- WordPress Custom Post Type and sort by Tags
- Custom Post Type Tags Showing Under Regular Post Tags
- Return all wordpress custom posts in specific multidimensional array
- get tags from custom post type
- custom post type tags
- Query Custom Post Type by Tag
- Loops running into each other
- Display by tag from different post types
- Tags and Taxonomy links not working for Custom Post Types
- Tag-post relationship problem
- Add text to metabox input text field from Thickbox
- Loop to pull content from parent element in custom post type [duplicate]
- Post type cloud like tag cloud?
- WordPress 3.1 – Tag page not showing posts from custom post type
- Attaching multiple custom taxonomies to one CPT?
- how insert how many post type in this function?
- Add a class to a menu item depending on a body class
- How to set up a echo? [closed]
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- How do loop categories post from according in WordPress? is it impossible to solve this problem?
- ACF – Tags not showing up in Custom Post Types
- Pull total post count for child category and parent if term ID
- Tag template for Custom Post Types
- Search for portfolio tags & mixing portfoliotags and post tags