На странице одного сообщения пользовательского типа я пытаюсь получить текущий термин таксономии
$current_term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
print_r($current_term);
current_term, get_query_var ('term') и get_query_var ('taxonomy') ничего не возвращают
ОБНОВЛЕНИЕ:
$ term = get_queried_object ();print_r ($ term);:
WP_Post Object
(
[ID] => 324
[post_author] => 1
[post_date] => 2019-10-17 14:18:37
[post_date_gmt] => 2019-10-17 14:18:37
[post_content] => The performance data
[post_title] => Diversified Fund
[post_excerpt] =>
[post_status] => publish
[comment_status] => closed
[ping_status] => closed
[post_password] =>
[post_name] => diversified-value-fund
[to_ping] =>
[pinged] =>
[post_modified] => 2019-10-31 20:44:43
[post_modified_gmt] => 2019-10-31 20:44:43
[post_content_filtered] =>
[post_parent] => 0
[guid] => http://hwcm.my/?post_type=funds&p=324
[menu_order] => 1
[post_type] => funds
[post_mime_type] =>
[comment_count] => 0
[filter] => raw
)