This plugin, xb Tag-Out Regex Wrestling Teammate, allows you to cast a steely samurai gaze over a given post and extract in an instant the tag you seek.
Say, for example (this is what I made it for), you have a post with an image in it. You want to yank the image (tag) only, and display that in a query somewhere else. You need this plugin and a line of code like this inside the loop that will show your extracted image:
<?php echo xb_extractor("<img[^>]*>"); ?>
Working on an upcoming site for a record label and using WP for CMS, we had a need to extract only a specific tag from the post contents when displaying lists of CD releases. I wanted to pull JUST the album cover out of a post, and display that in the preview page.
The result was "xb Tag Out", a very simple regex plugin for WP that will let you extract any single tag you like from a post.
Download the plugin:
Comments
Post new comment