CPT / Taxonomy Display Problems
-
This is a cry for help. Now, before lecturing me on “please use the search before asking” I want to tell you that I have searched the internet, WordPress Codex and all sorts of Forums and I didn’t get my problems fixed – spent the whole day yesterday, approx. 12 hours, searching, trying, checking, deleting, more searching…
Explanation:
I have a Custom Post Type called Lexikon.
Taxonomy 1: Pflanzenkategorie (typeofplant)
in there1: Gewürze (Spices)
in there2: Kr?uter (Herbs)
Taxonomy 2: Herkunft (Countries the herb/spice comes from)
in there1-…: Loads of CountriesProblem Number 1:
I don’t want to use an archive. I set a page (custom template page-lexikon.php) and on there I want 1. a list of all the posts tagged Gewürze and 2. a list of all the posts tagged Kr?uter. That is, because I don’t want to just list them, I want to put them in divs aside one another using float: left; and style them a bit. That problem is the smaller one, since for now I found a plugIn which does that, but sooner or later I want to do this via code in the page template. All the array codes, term_list, post_list codes (I don’t even remember everything, tried up to 40 different code versions I found on the internet yesterday) did not work for me. I’m pretty sure I did something wrong or forgot something ??
Page:
LexikonProblem number 2:
In the articles (one for every spice / herb) I listed the tags via Multi-Column Taxonomy List PlugIn. I was hoping it would list only the tags related to the post, but it lists every single tag.
Example:Vanilla:
Herkunft:
(here it shows all the countries in the Herkunft taxonomy, not only those which I tagged Vanilla with)Taste:
(same)I was hoping there was a code like
<?php $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list ): ?> <?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> |
for taxonomies, but I can’t find anything.
I’m really desperate by now, I’ve been trying and searching for days – and it’s just a hobby project. I’m pretty sure I’ve overlooked something, forgot to add something, or added the wrong stuff. I don’t really know where to look and what to do anymore.
Thank you very, very much in advance for any kind of code example you can give me, I’ll appreciate it so much!
- The topic ‘CPT / Taxonomy Display Problems’ is closed to new replies.