Forums Forums Search & Filter Pro Custom Search Result

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #71555

    I am now doing custom result by search & filter pro. I already know the code <?php echo get_post_meta(get_the_ID(), ‘wpcf-price’, true); ?> to show custom post field. However I need to know the code to show

    1. Custom taxonomy (e.g. slug = college)
    2. An Image upload the post (e.g. slug = wpcf-image)

    Thanks

    Trevor
    #71594

    Taxonomy terms for a post can be retried like this, I think:

    <?php $terms = wp_get_post_terms( get_the_ID(), $taxonomy, $args ); ?>
    

    See here:

    https://codex.wordpress.org/Function_Reference/wp_get_post_terms

    Images are attachments. I am assuming that you are not meaning the thumbnail, maybe you need this:

    https://codex.wordpress.org/Function_Reference/get_attached_media

    But that will give you an array, which you would then need to loop through.

    Anonymous
    #71657

    Sorry Trevor I am quite beginner on coding. I not really understand wordpress codex documentary therefore i need help.

    1. I have create custom taxonomy slug = college. I would like to show the selected name to show in result page.
    2. I have create a custom field to upload images slug = image-gallery. I would like to show the image into the result page.

    Please assist.

    Thanks

    Trevor
    #71672
    This reply has been marked as private.
    Anonymous
    #71846
    This reply has been marked as private.
    Trevor
    #72121

    Which of the search forms is it, and what page is the form on (or is it the same as the results URL)?

    This may well be a lot quicker if we talk on Skype.

Viewing 6 posts - 1 through 6 (of 6 total)