• Hi,
    I’m sorry if the question has already been answered. English is not my primary language, I may have missed it out…

    I’d like to use the get_the_term_list() function with my new taxonomies. But I don’t understand wher to declare it ? I created them in my admin panel, and I think I should add it in some php files but where and how ?

    If somebody talking French is there, don’t hesitate to participate ?? !
    S’il y a un fran?ais dans le coin, j’accepterai très volontiers son aide !

    Thank you !

    Delphine

    https://www.ads-software.com/plugins/wp-listings/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author agentevolution

    (@agentevolution)

    You would need to use that function in a custom template, depending on where you want to display it. i.e. single-listing.php or archive-listing.php

    Thread Starter ddcreas

    (@ddcreas)

    Yes that’s what I did, I took this code as exemple

    if ( '' != wp_listings_get_property_types() ) {
    			$listing_meta .= sprintf( '<li>Type: %s', get_the_term_list( get_the_ID(), 'property-types', '', ', ', '' ). '</li>' );
    		}

    But I can’t do this with a new one ?

    Plugin Author agentevolution

    (@agentevolution)

    Change the property-types slug to the slug of your taxonomy.

    Thread Starter ddcreas

    (@ddcreas)

    I have a problem with the language … ?? What is slug ?

    Thread Starter ddcreas

    (@ddcreas)

    Can I write something like if( ” != wp_listings_get_races() ) ?

    Plugin Author agentevolution

    (@agentevolution)

    Yes, using races as an example the code would look like:

    if ( '' != wp_listings_get_races() ) {
    			$listing_meta .= sprintf( '<li>Type: %s', get_the_term_list( get_the_ID(), 'races', '', ', ', '' ). '</li>' );
    		}

    Note the change in the get_the_term_list function also.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add taxonomy with terms links’ is closed to new replies.