Retrieve the currently-queried object
<?php //* Do NOT include the opening php tag shown above. Copy the code shown below. $queried_object = get_queried_object(); var_dump( $queried_object );