Ivan Admin
Joined: 16 Apr 2005 Posts: 340 Location: Belgrade
|
Posted: Tue Jan 10, 2006 8:30 pm Post subject: |
|
|
If the [] brackets are causing you problems, you can
1. Use SimpleTags 1.2 which uses angle brackets. Note that it is not compatible with the WYSIWYG editor which is enabled by default in WP 2.
or
2. Use different tags by modifying simpletags.php. For example, to use the angle brackets like in previous versions of SimpleTags, make the following changes in simpletags.php:
| Code: |
Change $tag_pattern = '/(\[tag\](.*?)\[\/tag\])/i';
to $tag_pattern = '/(<tag>(.*?)<\/tag>)/i';
and
$tags_pattern = '/((?:<p>)?\s*\[tags\](.*?)\[\/tags\]\s*(?:<\/p>)?)/i';
to $tags_pattern = '/((?:<p>)?\s*<tags>(.*?)<\/tags>\s*(?:<\/p>)?)/i';
|
If you already have some posts which are tagged with a different tag type, you have to perform a simple update on your wp database so that old posts will be tagged correctly.
| Code: |
update wp_posts set post_content = REPLACE(post_content, "[tags]", "<tags>");
update wp_posts set post_content = REPLACE(post_content, "[/tags]", "</tags>");
update wp_posts set post_content = REPLACE(post_content, "[tag]", "<tag>");
update wp_posts set post_content = REPLACE(post_content, "[/tag]", "</tag>");
|
|
|