0

building on to my previous query, I'm looking for a way to display the current tag's name and description in the sidebar of the tag archive. I've tried using get_queried_object_id(), but that does not seem to work for archives.

(I'm already using the Custom Sidebars plugin that allows me to display a PHP Code Widget on the tag archive only, so I'm essentially only looking for a way to get the display itself working.)

Any suggestions would be greatly appreciated!

Thanks so much in advance,

Julian

2
  • Have you tried get_the_archive_title()? developer.wordpress.org/reference/functions/… Commented Nov 28, 2017 at 16:55
  • Don't know how I missed that - worked like a charm! (In conjunction with get_the_archive_description(), for anyone who means to recreate this in the future)
    – Segia
    Commented Nov 28, 2017 at 17:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.