OK, so you have to modify some part of your code like so:
$list=" ";
while ( have_posts() ) {
the_post();
$terms = get_the_terms( $post->ID, 'port_tags' );
$terms_string = '';
if ( $terms ) {
foreach ( $terms as $term )
$terms_string .= $term->slug . ' ';
}
$list .= '<li class="mix all '. $terms_string .'">'
. '<div class="listing-content">'
. '<h3><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>'
.'<p>' . get_the_excerpt() . '</p>'
. '<a href="' . get_permalink() . '">' . 'View »' . '</a>'
. '</div>'
. '<a class="listing-thumb" href="' . get_permalink() . '">' . get_the_post_thumbnail($page->ID, 'listing-thumb') . '<span></span></a>'
. '</article>'; // <- it should be </li> not </article>, I guess - you don't open any <article> tag in this loop
}
Related Posts:
- Create a shortcode to display custom post types with a specific taxonomy
- Generate Shortcodes by Taxonomy
- Is it possible to create a shortcode that will query a post based on taxonomies?
- Custom Post Type Loop within Shortcode
- Display Recently Added Custom Post Types with Custom Taxonomy Shortcode
- Get custom post type list for every category shortcode
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- Display CPT Category List as Shortcode
- Custom post type shortcode with taxonomy attribute not working and no errors
- Shortcode in excerpt
- Plugin Error on activating
- Shortcode display CPT Query only showing 1 post?
- How to Create Short Code Using Custom Post type
- trying to display custom post type with custom taxonomy value by shortcode can’t works [closed]
- Problem with shortcode
- Advanced search form with filters for custom taxonomies and custom fields
- Show Custom Taxonomy Inside Custom Menu
- Check if a custom taxonomy archive page is being displayed
- How to limit the number of terms (terms acts like categories)
- Why does a custom post type need the ”hierarchical’ args setting?
- Permalink rewrite with custom post type and custom taxonomy
- Semantic URL Custom Post Type and Taxonomies permalinks
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Add custom taxonomy to custom post type
- How do I add a custom post type to the Featured Content in twenty fourteen theme?
- Ajax filter with custom taxonomies
- Is there An Input Checkbox Option That Works like `wp_dropdown_categories()` To Use In A WP Search Form?
- Custom Post Types – Titles as Taxonomies
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Using pre_get_posts to Filter Posts
- Adding Custom Taxonomy Archive Link to Nav Menu Shows Up As (Invalid)
- Query for custom post type objects in a taxonomy and with a meta value
- Get post type from taxonomy or category page
- get_categories() for only CPT
- How to dynamically build a multiple taxonomy query loop within a post type’s single loop?
- Custom Post Custom Taxonomy Data Not Saving in Edit Screen
- CPT Search Form with Taxonomy filter & Or
- Custom Post Type – Display Categories & Tags In Dashboard list
- Weird problem happening with custom taxonmy when creating/updating posts
- $wpdb: Counting posts corresponding to 3 terms in 3 different taxonomies
- Display CPT posts based on specific taxonomy
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Overriding taxonomy and custom post type
- How to use custom taxonomies to reference complex relationships?
- Taxonomy custom post type URL
- How to checked selected category checkbox when my custom post inserted from frontend
- How do I display the taxonomy for a custom post type in an array
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- How to edit this code to get the categories in achieve page?
- Get general taxonomy name for a Custom Post Type
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- List Taxonomy Terms based on another Taxonomy
- Best way to organize book-page structure
- Get url.com/post_type/taxonomy/term work!
- Ordering values entered in Custom Taxonomies
- Three Most Recent Posts, One Per Term
- How to get WordPress term attached to the Post?
- How can I merge this function(s) that inserts terms to a custom taxonomy with this other that adds a custom taxonomy filter?
- SEO Concerns With Rewrite Rules
- Empty taxonomy items for CPT in admin grid
- How to get_term_meta on single custom post?
- WordPress custom post type and taxonomies
- Display Custom Post Types Glossary
- How to fetch custom post types with its full data on wordpress?
- Shortcode with WP_Query more than once on one page
- Query only current post type using taxonomy
- Template for custom taxonomy for custom post type broken
- Taxonomies exists – but not showing up
- “Cannot redeclare cpt_reg_tax()” because of functions.php
- custom taxonomy listing returns no posts
- WP_Query order custom post type with certain meta key value by post modified date
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Writing a custom Glossary plugin
- How to show custom posts
- How to show Custom Post Types under Taxonomy in a new WordPress page template?
- Display Posts that fit a certain criteria on Category pages
- Shortcode with loop stacks output
- Displaying all posts by category and showing content on click
- Store a value in global scope after init hook is fired
- How do I find out which (page) template file my custom child post is looking for?
- How to search through all child taxonomies using WP_Query?
- Custom post type and custom taxonomy key lenght & query performance
- Custom Post Taxonomy Template Not Loading Properly
- Change the term based on the value of a $variable using wp_update_post in submitting a form
- Show ajax form resuslts in page
- Dropwdown: Get taxonomy terms from posts that share preselected terms from 3 other taxonomies
- Exclude Posts in a Given Category
- Custom permalink with custom taxonomies for custom post type
- Front page url permalink
- Custom meta box in editor of custom post type not working
- Looping through custom taxonomy in one template
- Custom Post Type Permalinks Problem
- Issue on Adding Taxonomy to Custom Post Type Using Function
- Show custom taxonomies in admin panel under custom post type
- Plugins for putting Custom Post Types into the Menu
- Custom term link return 404 error
- Remove slug from Custom Category Permalink + dual-category permalinks
- Display associated taxonomy child name on single CPT page
- How is it possible to list custom post types by “category” like with simple posts?
- Permalinks for Custom Post Types and Taxonomies