Skip to content

Instantly share code, notes, and snippets.

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 codehooligans/25ad8fc1ce95710aa119 to your computer and use it in GitHub Desktop.
Save codehooligans/25ad8fc1ce95710aa119 to your computer and use it in GitHub Desktop.
codehooligans.com: WordPress Plugin Media-tags Usage
<?php
$media_items = $mediatags->get_media_by_tag('media_tags=sidebar&post_parent=6');
/*
This call will filter the tags for the tag 'sidebar' and the post ID of 6.
The function take three arguments.
media_tags (Required) This is the tag or tags you are filtering on.
media_types (Optional) Lets you also filter by pdf, txt, etc.
post_parent (Optional) The ID of the attachment post. If not provided then the global post ID is assumed.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment