Support » Plugins » Hacks » get all related post thumbnails in taxonomy template

  • Situation:
    I’ve got 3 theme files:

    1. functions.php
    2. single-advocaten.php
    3. taxonomy-rechtsgebieden.php


    1. The functions.php contains:

    [code moderated]

    2. The single-advocaten.php contains:

    <h3>Mijn Rechtsgebieden</h3>
    <?php echo get_the_term_list( get_the_ID(), 'rechtsgebieden', '<section class="meta rechtsgebieden">', '<br />', '</section>' ); ?>

    3. The taxonomy-rechtsgebieden.php contains:

    <h3>Onze advocaten</h3>
             <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
             <?php echo get_the_post_thumbnail( $id, array(150,150) ); ?>


    Explanation situation:
    There are “advocaten” (lawyers) with one or more “rechtsgebieden” (jurisdictions).
    The Lawyers are placed in the custom post type “advocaten” with one or more jurisdictions as custom taxonomy “rechtsgebieden”.
    These jurisdictions are linked in the Lawyers page to the taxonomy template.

    In the taxonomy jurisdictions template (taxonomy-rechtsgebieden.php), is just 1 thumbnail with permalink visible.


    Looking for solution:
    The Jurisdictions template (taxonomy-rechtsgebieden.php) has to show all the related thumbnails of the post type Lawyers (single-advocaten), instead of just one.

    [duplicate: – please continue wit your original topic – closed]

  • The topic ‘get all related post thumbnails in taxonomy template’ is closed to new replies.