Support » Plugin: Custom Post Type UI » taxonomy not displaying on front end

  • I will try to explain this. I imported an older site that was using Custom Post Type UI into a new site that had the same taxonomy fields. The taxonomy fields imported correctly. I set up a single.php in my theme that has the follow

    `<?php $era_values = get_post_meta($post->ID, ‘era’, true ); ?>
    <li class=”building-meta”><span class=”building-meta-label”>Era:</span> <span class=”building-meta-values”><?php echo $era_values; ?></span>

    <?php $neighborhood_values = get_post_meta($post->ID, ‘neighborhood’, true ); ?>
    <li class=”building-meta”><span class=”building-meta-label”>Neighborhood:</span> <span class=”building-meta-values”><?php echo $neighborhood_values; ?></span>’

    These 2 fields show up on the front end from the older imported materials but any new content selections in those 2 taxonomies do not appear. They are appearing on the post editor page and I’m also using Query Multiple Taxonomies plugin and those newly selected taxonomies are displaying properly there. I’ve checked my theme code compared to the other taxonomy code on single.php and I can’t see any difference. Do you have any suggestions?
    thanks Pam

Viewing 2 replies - 1 through 2 (of 2 total)
  • Forgot to say that changing the taxonomy selection does not change the output on the older posts at all.

    Plugin Author Michael Beckwith


    I’m a little bit confused. You migrated the old CPTUI post types and whatnot to the new location and all that went well.

    You then have 2 places where you display html list items that echo post meta for Eras and Neighborhoods. After that, you start mentioning stuff about taxonomies, which are different than post meta.

    It sounds like your new posts aren’t getting the same meta key/meta value pairings saved at all. This would be set with the “Custom fields” metabox in your post editor.

    However, if you’re now using a taxonomy to assign terms to the posts, then you’ll need to use something like get_the_terms() to fetch those and display in your template file. Another option, get_the_term_list()

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘taxonomy not displaying on front end’ is closed to new replies.