Forums › Forums › Search & Filter Pro › Problem with the taxonomies I made
- This topic has 4 replies, 2 voices, and was last updated 5 years, 9 months ago by Trevor.
-
Anonymous(Private) April 19, 2019 at 1:05 pm #208829
Hi Trevon, I have a problem with the taxonomies I made.
I would like them to appear when I select an article, but I don’t know how.I’ll give you an example to better understand.
If you go on this article: http://sito.oenoa.it/se-toccate-il-mio-tasto-sbagliato/#toccate-tasto-sbagliato/page1
above, the date appears (August 20, 2009), but there are no my taxonomies, why? what can I do?Thanks, Michele
Trevor(Private) April 23, 2019 at 11:30 am #208913My apologies for the delay in replying. In the UK we have had a long 4 day national holiday weekend this last weekend.
To your question. For example,
argomenti
?Did you make a custom version of the results.php file, as detailed here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
It will require some custom code in that file, in the location/line where you want the terms output. For example, for argomenti, it would be something like this (but you can add your own HTML and classes etc):
$taxonomy_terms = get_terms('argomenti'); foreach($taxonomy_terms as $term){ $terms[] = $term->name; } if(!empty($terms)) { echo join(", ", $terms); unset ($terms); }
Anonymous(Private) April 25, 2019 at 12:10 am #209249Hello,
I did as you explained and entered the code you gave me, but, all the taxonomies of “ARGOMENTI” that I entered appear … while only the selected ones should appear.I don’t know if I entered the code in the right place.
<p><?php the_category(); ?></p> <p><?php the_tags(); ?></p> <p><small><?php the_date(); ?></small></p> <?php $taxonomy_terms = get_terms('argomenti'); foreach($taxonomy_terms as $term){ $terms[] = $term->name; } if(!empty($terms)) { echo join(", ", $terms); unset ($terms); } ?>
-
AuthorPosts