Dynamic content not rendering in element on taxonomy archive with no posts
-
Hi there,
I hooked in a block element that uses dynamic content for headlines on a custom taxonomy archive page (it displays both the term name and some term meta fields).
Sometimes the dynamic content renders, and other times not. I’ve narrowed it down to taxonomy archive pages with no posts in the main loop being when it doesn’t render the dynamic content. However, I still need to display the term name and the term meta on the page when there are no posts.
How can I make sure the dynamic content still renders, even when there are no posts in the main loop?
If I create a hook element and code the lookup myself in PHP (see below for code I’ve tested), it works fine, so I can’t see why dynamic content for the term itself wouldn’t work in a headline when there are no posts in the loop.
$term = get_queried_object_id(); $currency = get_term_meta( $term, 'meta_key' , true);
Thanks in advance,
SamThe page I need help with: [log in to see the link]
- The topic ‘Dynamic content not rendering in element on taxonomy archive with no posts’ is closed to new replies.