php - Display Custom Taxonomy Field in sidebar -
Hi friends, I am trying to display classification field to be called
clpr_store_video code> It is possible to call field values outside of the loop on the sidebar in my wordpress sidebar for every wordpress, but now linked to the post id?
I do not know whether it is possible or how to do this.
Edit I tried with another tutorial but there was no luck.
$ queried_object = Get_queried_object (); $ Classification = $ queried_object- & gt; Classification; $ Term_id = $ queried_object-> Word_id; $ Subtitles = get_field ('clpr_store_video', $ classification. '_'. $ Term_id); $ Subheading echo; See the code block for the post and taxonomies and classification related to their list of links:
If you want to get a classification related to a particular term
$ terms = get_the_terms (get_the_ID (), 'clpr_store_video'); Forex Currency ($ word $ word) {echo $ subtitle = $ word-> Name; } If you want to get a list of all taxonomyes and links
& lt; Ul & gt; & Lt ;? Php $ taxonomies = get_terms ('clpr_store_video', array ("field" => "all")); Foreign Currency ($ taxonomies as taxonomy) {echo & quot; Li & gt; & Lt; A href = "'get_term_link ($ classification)." & Gt; ' $ Classification-> Name. '& Lt; / A & gt; & Lt; / li & gt; '; }? & Gt; & Lt; / Ul & gt;
Comments
Post a Comment