function bitt_current_archive_taxonomy()

This function gets the current archive taxonomy on an archive page.

Useful in Advanced Queries in Oxygen.

function Code

<?php
/**
 * Get the current taxonomy
 * 
 * @return string $current_taxonomy - the current taxonomy
 */
if (!function_exists('bitt_current_archive_taxonomy')) {

    function bitt_current_archive_taxonomy()
    {
        $current_taxonomy = get_queried_object()->taxonomy;
        return $current_taxonomy;
    }
}
?>
Leave a Reply

Your email address will not be published. Required fields are marked *

    Table Of Contents

    Related Content

    © 2020-2024 Luxibay
    Name(Required)
    Please let us know what's on your mind. Have a question for us? Ask away.
    This field is for validation purposes and should be left unchanged.