WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] list current custom tax as hyperlink (3 posts)

  1. gillispj
    Member
    Posted 1 year ago #

    How do turn the listed term as a hyperlink to parent custom taxonomy? I am stuck!

    <?php
    	$terms = get_the_terms( $post->ID, 'program' ) ;
    	$term_list = array_pop($terms)->name ;
    	foreach( $terms as $os )
    	{
    		$term_list .= "<br> " . $os->name ;
    	}
    	echo $term_list ;
    ?>

    Thank you,
    JG

  2. gillispj
    Member
    Posted 1 year ago #

    just to clarify I would want the custom tax to appear as hyperlink just like

    <?php the_category(); ?>

  3. gillispj
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic