Retrieve taxonomy field/column

Discussion in 'WordPress' started by littledevil2014, Apr 5, 2014.

  1. #1
    I have a posttype called store which has fields called title by default and custom field called storeurl.

    This posttype websites is made as taxonomy for the posttype books using CPT onomies, where store is displayed as checkboxes.

    What I am trying to do is display the book and based on the store selected in the checkbox the corresponding url of the store where its available, but though I am able to get the store name i am unable to retrieve the storeurl.

    <div class="collection">
    <div class="storename">
    <?php echo strip_tags(get_the_term_list( $post->ID, 'stores')); ?>
    </div>
    <div class="click">
    <a href=<?php strip_tags(get_term_field( 'storeurl',$post->ID, 'stores'))?>> BUY</a> </div> </div>
     
    littledevil2014, Apr 5, 2014 IP
  2. themes4all

    themes4all Well-Known Member

    Messages:
    662
    Likes Received:
    47
    Best Answers:
    6
    Trophy Points:
    100
    #2
    Just an idea!

    Why you don't use directly : <?php get_post_type_archive_link( stores ); ?> More information can be found here : Link
     
    themes4all, Apr 8, 2014 IP