Forums Forums Search & Filter Pro Show something based on taxonomy field value

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #45940

    Hello,

    I’m using taxonomy field in my search form. When I select taxonomy it gives me results based on this taxonomy term. Can I show something in my template based on this selection?

    Regards

    Trevor
    #45990

    What do you have in mind?

    Anonymous
    #46034

    I have a conditional if is_tax to display taxonomy term description. Is it possible to make a conditional to display something based on taxonomy field selection?

    My example:

    I have custom taxonomy called destinations. If I’m on taxonomy page I show description of this destination.

    I would like to do the same if I select value from taxonomy field. So when I select taxonomy term and when search is finished I would like to display selected taxonomy term description.

    Trevor
    #46141

    I understand. Are you able to insert snippets of PHP into pages, or if not, maybe shortcodes? It might be possible using PHP, treating the page as though it were a single post page, and thus accessing the taxonomy relating to that page. What WordPress often does when you do this is to fetch data from the first of the posts that actually appear on this archives page.

    It would be very crude though, and I am not sure it would work. Not something that I could do though.

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