Skip to content

Instantly share code, notes, and snippets.

@Viper007Bond
Created October 25, 2012 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Viper007Bond/3955044 to your computer and use it in GitHub Desktop.
Save Viper007Bond/3955044 to your computer and use it in GitHub Desktop.
<?php
$items = implode(
', ',
array_merge(
wp_list_pluck( (array) get_the_tags(), 'name' ),
wp_list_pluck( (array) get_the_category(), 'slug' )
)
);
if ( $items ) {
echo "\n\t<tags>{$items}</tags>\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment