Tag Me Out

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

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <code> <br> <h2> <h3> <h4> <h5> <h6>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.