WordPress.org

Ready to get started?Download WordPress

Forums

How to show taxonomies? (3 posts)

  1. wunderbaren
    Member
    Posted 4 years ago #

    Hello!

    I just found out how to show custom post types on my startpage, but how do i show a taxonomy?

    <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
    
    <?php the_title( '<div id="eventslist"><a class="events" href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a>' ); ?><div id="grey">Date: [DATE]</div></div>
    
    <?php endwhile; ?>

    Where i put [DATE] i would like to show a taxonomy who i named "from", is it possible? I can't find information anywhere how to do this. Thanks.

  2. MichaelH
    Member
    Posted 4 years ago #

    Have you tried:

    <?php echo get_the_term_list( $post->ID, 'from', '<p>From: ', ', ', '</p>' ); ?>
  3. alanchrishughes
    Member
    Posted 3 years ago #

    How do you show the posts or pages listed under a taxonomy? Is that possible?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags